rescript-association / reasonml.org

Deprecated in favor of rescript-lang.org
MIT License
125 stars 34 forks source link

Fix Inter font hinting issue #213

Closed lesha1201 closed 4 years ago

lesha1201 commented 4 years ago

Closes https://github.com/reason-association/reasonml.org/issues/211

I've used fonttools for subsetting Inter font

Example of a command for subsetting a font

pyftsubset /Inter-3.13/Inter\ Web/Inter-Regular.woff2 --unicodes="U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD" --verbose --flavor=woff2

Example of result on Windows 10 (2560x1440)

Before: image

After: image

ryyppy commented 4 years ago

This is looking good! Thanks for tackling this issue. 👍

Could you maybe add the command you used for generating the file as a comment within the font documentation as well? For the case we will need to regenerate the files later at some point?

I am not too well versed with font engines and I am not entirely sure what those unicodes represent. Are these just latin1 characters?

Another qestion: Is display: switch also essential for fixing the bug, or is this unrelated?

lesha1201 commented 4 years ago

I'll make changes.

I took unicodes from google fonts for latin characters. I will add a comment for that.

font-display isn't related to the issue but I noticed that Roboto has swap and also all google fonts comes with swap by default. Should I remove font-display for Inter?

lesha1201 commented 4 years ago

@ryyppy Added comments

ryyppy commented 4 years ago

Looking good 🚀

Great job!