-
Notifications
You must be signed in to change notification settings - Fork 88
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
Unexpected font selection with named + weight differences #241
Comments
The linked font is the one I was testing with, specifically I was testing the non-italic variant named
Correct, I'm using local files that have been loaded. I have no problems with the loading process.
I'm downloading from the page I linked by clicking Get Font, then Download All. This ticket really isn't about the font itself, it's about the methodology of font fallback selection. To me, if I have asked Cosmic Text to render "Shantell Sans" and the font weight delta is 100, I feel like it should still render "Shantell Sans" instead of an arbitrary fallback that happens to match the weight. Just to add another font to the mix: while debugging this, I picked another random font from Google fonts and it has a default weight of 200: https://fonts.google.com/specimen/Ojuju. I got really unlucky in that my two test fonts I was using today both had non-400 weights. |
I feel like we're talking past each other. Can we stop focusing on specific fonts, and talk about the actual issue I've reported? Sure, I could have picked some better versions of the fonts, but other users of my library might have variable fonts installed because other programs support variable fonts. The subject of this issue and the main focus of my description in the issue have not been about a specific font, but a very specific request. |
OK. |
I was trying to add support for dynamically loading fonts to my library that uses cosmic-text, and I downloaded a random font and tried specifying the attribute using the
FamilyOwned::Name()
variant. I spent an hour debugging this before I finally noticed why it wasn't being found.It wasn't due to a caching issue, it was due to the font I downloaded having a weight of 300, not 400. When I change the buffer's attributes to be a weight of 300, the font is found.
To me, the name of a font is more significant than the weight, especially if the difference is 100 or less. For reference, I was testing with Shantell Sans.
The text was updated successfully, but these errors were encountered: