chiark / gitweb /
Break out SVG_FONT_Y_ADJUST_OF_FONT_SIZE into a separate file.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 19 May 2022 17:22:05 +0000 (18:22 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 19 May 2022 18:58:17 +0000 (19:58 +0100)
The dice template extractor is going to want this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/SVG_FONT_Y_ADJUST_OF_FONT_SIZE.txt [new file with mode: 0644]
src/ui.rs

diff --git a/src/SVG_FONT_Y_ADJUST_OF_FONT_SIZE.txt b/src/SVG_FONT_Y_ADJUST_OF_FONT_SIZE.txt
new file mode 100644 (file)
index 0000000..c74e8a0
--- /dev/null
@@ -0,0 +1 @@
+0.35
index 1275c84b08d0abbe5114aad521fe8d22643e0e8e..b0411f9f3e7ca59ad3f93185dfc937d7c73c229c 100644 (file)
--- a/src/ui.rs
+++ b/src/ui.rs
@@ -39,7 +39,8 @@ pub struct TextOptions {
 /// troublesome.  We bodge it.  Multiple the font size (in pixels)
 /// by this, and add it to the SVG y coordinate (ie, shufting the text
 /// down).
-pub const SVG_FONT_Y_ADJUST_OF_FONT_SIZE: f64 = 0.35;
+pub const SVG_FONT_Y_ADJUST_OF_FONT_SIZE: f64 =
+  include!("SVG_FONT_Y_ADJUST_OF_FONT_SIZE.txt");
 
 pub fn default_edge_width() -> f64 { DEFAULT_EDGE_WIDTH }