You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was converting a ttf fot to svg using FontForge and when trying to edit this using the Custom Stroke Font - Edit Font it failed and I got nothing. It turned out that there was quite a few glyphs in the svg from FontForge missing the horiz-adv-x attribute. I guess this is a bug in while FontForge generate svg-font (the left/right bearings of those glyphs look fine when inspecting them in FontForge). Anyway - this problem was fixed by changing line 114 of stroke_font_manager.py
From rOffset = float(e.getAttribute(xROff))
To if e.getAttribute(xROff) == "": rOffset = 0 else: rOffset = float(e.getAttribute(xROff))
Ideally there should be a warning in the end that some (ideally which) glyphs had missing horiz-adv-x and that this is set to 0, or it could be set to the width of the bounding box to have something that might work - not as strange and obviously wrong as 0.
At least this made it possible to continue editing the font. So I'm happy with this solution.
The text was updated successfully, but these errors were encountered:
I was converting a ttf fot to svg using FontForge and when trying to edit this using the Custom Stroke Font - Edit Font it failed and I got nothing. It turned out that there was quite a few glyphs in the svg from FontForge missing the horiz-adv-x attribute. I guess this is a bug in while FontForge generate svg-font (the left/right bearings of those glyphs look fine when inspecting them in FontForge). Anyway - this problem was fixed by changing line 114 of stroke_font_manager.py
From
rOffset = float(e.getAttribute(xROff))
To
if e.getAttribute(xROff) == "":
rOffset = 0
else:
rOffset = float(e.getAttribute(xROff))
Ideally there should be a warning in the end that some (ideally which) glyphs had missing horiz-adv-x and that this is set to 0, or it could be set to the width of the bounding box to have something that might work - not as strange and obviously wrong as 0.
At least this made it possible to continue editing the font. So I'm happy with this solution.
The text was updated successfully, but these errors were encountered: