Giter Site home page Giter Site logo

Comments (13)

MaxBazarov avatar MaxBazarov commented on May 23, 2024 2

Ok, I submited a bug report to Sketch. Will keep you informed.

from puzzle-tokens.

MaxBazarov avatar MaxBazarov commented on May 23, 2024 1

@tijmenvangurp I tried to forget Fontforge dark magic. Because it's a nightmare.
But if I remember correctly — I changed these fields:
Screenshot 2020-04-15 at 23 13 35

from puzzle-tokens.

MaxBazarov avatar MaxBazarov commented on May 23, 2024

Thanks for the report. I will check it.

from puzzle-tokens.

MaxBazarov avatar MaxBazarov commented on May 23, 2024

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.

from puzzle-tokens.

MaxBazarov avatar MaxBazarov commented on May 23, 2024

I will continue a research to workaround it somehow.

from puzzle-tokens.

MaxBazarov avatar MaxBazarov commented on May 23, 2024

Another solution is to uninstall Thin and Ultra Thin fonts. In this case font-weight:200 will select Light font.

from puzzle-tokens.

tijmenvangurp avatar tijmenvangurp commented on May 23, 2024

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.

from puzzle-tokens.

pfederi avatar pfederi commented on May 23, 2024

@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.

from puzzle-tokens.

barmallion avatar barmallion commented on May 23, 2024

Maybe simple css don't have light font size? https://htmldog.com/references/css/properties/font-weight/

from puzzle-tokens.

tijmenvangurp avatar tijmenvangurp commented on May 23, 2024

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.

from puzzle-tokens.

tijmenvangurp avatar tijmenvangurp commented on May 23, 2024

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.

image

from puzzle-tokens.

MaxBazarov avatar MaxBazarov commented on May 23, 2024

from puzzle-tokens.

tijmenvangurp avatar tijmenvangurp commented on May 23, 2024

In the end, I had to change 3 font-weight names. I followed this table and everything works

https://support.invisionapp.com/hc/en-us/articles/115003217203-How-does-Inspect-determine-the-font-weight-displayed-in-my-prototype-

from puzzle-tokens.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.