Open pfederi opened 4 years ago
Thanks for the report. I will check it.
Sketch handles font weight selection by UI and by API in slightly different ways. As a result you can select Light or Thin weight in UI, but in Sketch API both weights are equal (3), so I can't set a valid value.
We met this problem before with other font and the only one solution which we found was to patch the font using FontForge.
I will continue a research to workaround it somehow.
Another solution is to uninstall Thin and Ultra Thin fonts. In this case font-weight:200 will select Light font.
Ok, I submited a bug report to Sketch. Will keep you informed.
Sketch handles font weight selection by UI and by API in slightly different ways. As a result you can select Light or Thin weight in UI, but in Sketch API both weights are equal (3), so I can't set a valid value.
We met this problem before with other font and the only one solution which we found was to patch the font using FontForge.
Do you know what the fix is in fontforge? I am running into the same issue.
@tijmenvangurp I found a workaround for the light Font doing it like this: font-weight: thin; //thin because light is not working for the moment
That workaround is just working if you don't want to use all the font-weights.
Maybe simple css don't have light font size? https://htmldog.com/references/css/properties/font-weight/
@tijmenvangurp I tried to forget Fontforge dark magic. Because it's a nightmare. But if I remember correctly — I changed these fields:
It might be that sketch is following https://docs.microsoft.com/en-us/typography/opentype/spec/os2#usweightclass the OpenType specs? I will try to change the weight names to what the open type has and see if that works.
This fix worked for me. I had to update the name in preferred styles from Xbold to extra-bold then if apply font-weight 800 it works :)
Btw, this fix is only needed for the people in the team using the plugin, since sketch does not see it as an actual different font in use.
Wow. Great.
On 16 Apr 2020, at 10:09, Tijmen van Gurp notifications@github.com wrote:
It might be that sketch is following https://docs.microsoft.com/en-us/typography/opentype/spec/os2#usweightclass https://docs.microsoft.com/en-us/typography/opentype/spec/os2#usweightclass the OpenType specs? I will try to change the weight names to what the open type has and see if that works.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ingrammicro/puzzle-tokens/issues/19#issuecomment-614457094, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMQVAU43FZLJLPXHS3RDJTRM2VI5ANCNFSM4J52T5WA.
In the end, I had to change 3 font-weight names. I followed this table and everything works
font-weight:light; is not working with Roboto. Didn't try with other fonts. When I apply the Design Tokens in Sketch the font-weight added is regular.
other Font-Styles as thin or bold are working correctly