glyphr-studio / Glyphr-Studio-1

Now deprecated, Glyphr Studio v1 served us well from 2010 to 2023.
https://www.glyphrstudio.com
1.07k stars 93 forks source link

Bug when fonts saving #337

Closed diesel167 closed 2 years ago

diesel167 commented 2 years ago

I spent a lot of time searching my mistake. But it seems that there is a mistake in the service. Please, try to open any font (.otf formatted) then do nothing and save it. Open Glyphr in new tab and import saved font there. "X" coordinate of every symbol will 20 points more than in original font, width will 20 points more too. What is going on? In the past it was good.

before saving Ashampoo_Snap_8 июля 2022 г _19h10m28s_018_

open font after saving Ashampoo_Snap_8 июля 2022 г _19h10m33s_019_ Also saved font looks bad in usage.

When i preview it before saving: Ashampoo_Snap_8 июля 2022 г _19h19m35s_020_ After saving (and doing nothing before): Ashampoo_Snap_8 июля 2022 г _19h19m43s_021_

UPD: if you import .ttf, not .otf and then export .otf - all looks fine.

mattlag commented 2 years ago

I'll take a look - Glyphr Studio has a feature for Automatic Side Bearings, which defaults to 20... They are supposed to be disabled when you import a font - so maybe they are being added when they shouldn't be.

mattlag commented 2 years ago

Looks like OpenType.js is giving NaN as the advance width when importing some fonts. When this happens, the "auto-calculate glyph width" is turned on, and by default there are side bearings applied (which is where the extra width is being added).

I'm doing further investigation to see about the import bug from OpenType.js

mattlag commented 2 years ago

I just pushed an updated version, v1.13.12 - refresh Glyphr Studio online, make sure the version number is correct, and see if you are still having the issue. image

mattlag commented 2 years ago

I believe this is fixed, let me know if not.