-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Generated fonts have unequal top- & bottom-whitespace #33
Comments
Have you tried changing the line-height? This may have something to do with the current font-size and line-height of the icon's parent element. |
Not a line-height thing. After comparing the font I generated to the one on the fontcustom homepage (and a system font to use as a baseline): ...It seems pretty clear that it's an issue with either my SVG files, or the compiler. Any chance you could share the file you used to create your fonts? That way I could compile it locally to try and pinpoint where the issue is. |
I think this may have something to do with the ascent and descent of the generated glyphs. We actually had some issues with this as well since we were transitioning to use fontcustom from icomoon, where the ascent and descent are modified based on an svg size of 512 and base font size of 16. Fontcustom's generated svg is set at 1000 and the ascent and descent are default. This means whitespace is 0 on the horizontal of the glyph and the glyph will reside on the baseline, NOT at the descender of the font. The font-forge API has options you can pass, namely fontforge.font().ascent and fontforge.font().descent. Would be nice to include some options to set custom ascender/descender? ...because we had to modify generate.py which is less than ideal ;) |
Ascent and descent have been tweaked in 1.0.0.pre — made a bit difference in my tests. @matthewferry I'll add a new issue for your options suggestion. |
Nice! Thanks @EZYZ |
When I compile, the resulting fonts are not vertically centered.
As they appear in Illustrator:
...And then as they appear on a webpage:
(Deep Pink background added to illustrate unequal whitespace.)
The text was updated successfully, but these errors were encountered: