summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudine Peyrat <88194877+claudinepeyrat06@users.noreply.github.com>2025-03-15 08:20:52 +0100
committerGitHub <noreply@github.com>2025-03-15 08:20:52 +0100
commit909cae8f1b9b3db31d23ee922732c7cd185bab23 (patch)
tree1caa653685ae841914fb0b355bab403601c3b1ce
parent5904100b59b0c969141721cc4de8aad0cac9c4f1 (diff)
not all guide positions are int (#3578)
linux libertine x_height is a float not an integer.
-rw-r--r--lib/extensions/lettering_svg_font_to_layers.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/extensions/lettering_svg_font_to_layers.py b/lib/extensions/lettering_svg_font_to_layers.py
index d5fc2219..be8a7f16 100644
--- a/lib/extensions/lettering_svg_font_to_layers.py
+++ b/lib/extensions/lettering_svg_font_to_layers.py
@@ -62,10 +62,10 @@ class LetteringSvgFontToLayers(InkstitchExtension):
emsize = fontface.get("units-per-em")
# TODO: should we guarantee that <svg:font horiz-adv-x> equals <svg:font-face units-per-em> ?
- caps = int(fontface.get("cap-height", 0))
- xheight = int(fontface.get("x-height", 0))
- ascender = int(fontface.get("ascent", 0))
- descender = int(fontface.get("descent", 0))
+ caps = float(fontface.get("cap-height", 0))
+ xheight = float(fontface.get("x-height", 0))
+ ascender = float(fontface.get("ascent", 0))
+ descender = float(fontface.get("descent", 0))
self.svg.set("width", emsize)
self.svg.namedview.add_guide(guidebase, True, "baseline")