-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
add Fontweight to fontid #3218
Comments
In particular, support for variable font weight would be nice. |
First of all: italics in epaint is a hack. We just skew the glyphs when we paint them. Ideally we should instead switch to an italic font of the same family instead. To fully support font weights and italics we need to have better support for selecting font families. For example: Inter is a font family with many different fonts for different weights and styles (Thin, Thin Italics, Bold, Bold Italics, etc). A font family can be stored in several .ttf files, or in the same one. To know what we have loaded, we would need to read it at some sort of font meta-data (was the loaded font thin, italics, …?). I don't think Once that all is done, then yes, So: if someone is interested in working on this, please help research how we can read the style metadata out of a .ttf file (i.e. thin vs bold, and italics vs normal), and maybe add that feature to |
I believe there are actually two stories here:
The latter would be very nice to have as I understand designers rely on it more and more. As it turns out, the font we're using for Rerun is variable (https://fonts.google.com/specimen/Inter). |
@emilk not sure if this is helpful, but ttf parser has an example for handling metadata: https://github.com/RazrFalcon/ttf-parser/blob/master/examples/font-info.rs |
It would be usefull if the font weight could be set when creating a fontid. Im not sure if there is another way, like it is solved for italics, but i would put it into fontid
The text was updated successfully, but these errors were encountered: