not all guide positions are int (#3578)

linux libertine x_height is a float not an integer.
pull/3583/head
Claudine Peyrat 2025-03-15 08:20:52 +01:00 zatwierdzone przez GitHub
rodzic 5904100b59
commit 909cae8f1b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -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")