Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font metrics for chrome browser on mac #379

Open
boryskryvous opened this issue Sep 12, 2019 · 2 comments
Open

Font metrics for chrome browser on mac #379

boryskryvous opened this issue Sep 12, 2019 · 2 comments

Comments

@boryskryvous
Copy link

How to change HHead* properties for generated font?
Screen Shot 2019-09-12 at 11 46 25 AM

@kayvanbree
Copy link

A little more backstory for this issue:

Everything works fine everywhere, expect in Chrome on MacOS. There our icons are all misaligned vertically like this:

Screen Shot 2019-09-12 at 11 44 29 AM

When changing HHeaed Ascent to 448, the font will actually display correctly. We tried to change that settings in fontcustom.yml, but that did not work:

# The font's ascent and descent. Used to calculate the baseline.
font_ascent: 448
font_descent: 64

How can we set the HHead Ascent in FontCustom?

@kayvanbree
Copy link

kayvanbree commented Sep 25, 2019

ATM we are trying to just fix the file on our Docker container:

RUN sed -i -e "s/font.ascent = options['font_ascent']/font.ascent = options['font_ascent']\nfont.hhea_ascent_add = False\nfont.hhea_descent_add = False\nfont.hhea_ascent = options['font_ascent']\nfont.hhea_descent = -options['font_descent']/" "/var/lib/gems/2.3.0/gems/fontcustom-2.0.0/lib/fontcustom/scripts/generate.py"

[edit]

This one actually works:

RUN sed -i -e "s/font_descent']/font_descent']\nfont.hhea_ascent_add = False\nfont.hhea_descent_add = False\nfont.hhea_ascent = options['font_ascent']\nfont.hhea_descent = -options['font_descent']/" "/var/lib/gems/2.3.0/gems/fontcustom-2.0.0/lib/fontcustom/scripts/generate.py"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants