chiark / gitweb /
clock: Explain why separate rendering with abs positions
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jun 2022 22:43:12 +0000 (23:43 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jun 2022 22:43:29 +0000 (23:43 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/clock.rs

index bd042565b18e48ba8d5e32a069b986d6789b2bd5..67ea4590db4bbdd4bcffff0ba2baa31ebcd00d2d 100644 (file)
@@ -504,6 +504,8 @@ impl PieceTrait for Clock {
              y, font, Html::lit(show.text),
              mins_pad, HtmlStr::from_html_str(&mins), Html::lit(show.sigil)
       )?;
+      // We write this separately because, empirically, not all the
+      // sigil characters have the same width, even in a mono font.
       hwrite!(f, r##"
   <{} x="14" y="{}" {} fill="{}" >{:02}</text>"##,
              HTML_TEXT_LABEL_ELEM_START,