chiark / gitweb /
deck: Make count use a monospaced font
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Jul 2021 19:53:28 +0000 (20:53 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 6 Jul 2021 00:25:23 +0000 (01:25 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/deck.rs

index 5e3101c628c2430ea131fd738ff88c315902a064..f2b7856fab3b07834c6f78ac0d796fa150b9c2a3 100644 (file)
@@ -106,8 +106,9 @@ impl PieceTrait for Deck {
       then {
         label.svg(f,
                   &self.shape.outline,
-                  self.shape.edges.get(0), 
-                  &count.to_html())?;
+                  self.shape.edges.get(0),
+                  &hformat!(r#"<tspan {}>{}</tspan>"#,
+                            monospace_font(5), count))?;
       }
     }
   }