-
Notifications
You must be signed in to change notification settings - Fork 4
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
Text styles generating wrong weight #11
Comments
Hi @bitfactory-lasse-vandenboschchristensen thank you for the heads up. Let me check if its resolvable – there was an issue with how Sketch was handling font weights that was being looked at. |
@tbrasington rock on :) |
@tbrasington I am having a similar issue with a Light font. Instead of the Light weight, it is generating a Thin font. |
Hey folks, what typefaces are you using? I can hopefully expand them for my testing. |
Awesome. Thanks! Fonts are ... SF Pro Display and SF Pro Text |
Hey everyone. So it seems that isn’t going to be possible with the current Sketch JS API. So for example in the San Francisco case thin and light both report back their weight is 3. This is as the internals in the sketch api are using this function (https://developer.apple.com/documentation/appkit/nsfontmanager/1462351-weightoffont?language=objc) here (https://github.com/sketch-hq/SketchAPI/blob/26b1fe92a89871e2db8ec04ccc8af49c735407cd/Source/dom/style/Text.js#L491) This only gives an approximation of the font weight which falls down when the font file isn’t mapped out in a certain way. |
Just had this bug too with TT Commons. What a shame! |
It is possible to get around it if you have tools to adjust the font properties. Some reading here ingrammicro/puzzle-tokens#19 |
Hi @tbrasington,
Just trying out your plugin. Sweet work 👍
I'm encountering a small issue when generating styles. For a specific style i'm specifying 'Heavy' as a weight. However upon generating the styles 'Extra Bold' is generated as a style. I manually override this for now, but just wanted to give you a heads up on the issue.
Cheers
The text was updated successfully, but these errors were encountered: