From 494bb1b748dc456f6c3a0f8f37e5c3d389f2c68a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 19 May 2022 18:22:05 +0100 Subject: [PATCH] Break out SVG_FONT_Y_ADJUST_OF_FONT_SIZE into a separate file. The dice template extractor is going to want this. Signed-off-by: Ian Jackson --- src/SVG_FONT_Y_ADJUST_OF_FONT_SIZE.txt | 1 + src/ui.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 src/SVG_FONT_Y_ADJUST_OF_FONT_SIZE.txt 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 index 00000000..c74e8a04 --- /dev/null +++ b/src/SVG_FONT_Y_ADJUST_OF_FONT_SIZE.txt @@ -0,0 +1 @@ +0.35 diff --git a/src/ui.rs b/src/ui.rs index 1275c84b..b0411f9f 100644 --- 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 } -- 2.30.2