Open ecton opened 5 months ago
What font has a weight of 300? (specifically)
The linked font is the one I was testing with, specifically I was testing the non-italic variant named ShantellSans-VariableFont_BNCE,INFM,SPAC,wght.ttf
Assume you are using the static fonts.
Correct, I'm using local files that have been loaded. I have no problems with the loading process.
And are you using the fonts downloaded from Google Fonts (v1.008) or the fonts from the repository release (v1.009)?
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.
That is the variable font. If you want to test the static fonts, they are in the
static
folder.
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.