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 support for italic text rendering #2795
Conversation
af54cee
to
1086b00
Compare
@@ -17,6 +17,38 @@ pub struct FontDatabase { | |||
target_arch = "wasm32" | |||
)))] | |||
pub fontconfig_fallback_families: Vec<String>, | |||
// Default font famiilies to use instead of SansSerif when SLINT_DEFAULT_FONT env var is set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
famiilies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a very emotional family :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I read the patch correctly that bold is supported now? If yes it'd be nice to be tested as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not quite there yet. I added the weight because... it was right there in my face :-). But it's not matched for yet. But you're right, might as well do it in one shot. I need to fix the screenshot bit anyway.
…nput` This is implemented for FemtoVG, Skia, and Qt.
Centralize also fontdb::Query creation and family fallback handling in sharedfontdb. This way SLINT_DEFAULT_FONT also works for the femtovg renderer.
1086b00
to
f830273
Compare
…p font path In the screenshot tests this works by setting SLINT_DEFAULT_FONT to pointer to a directory, instead of a file. We then load all fonts in that directory and consider their families the default unless a family is specified. This way for "Noto Sans" a regular as well as an italic version is registered in fontdb and returned in the list of font fallback ids. embed_glyphs in the compiler then embeds those variants and we find them at run-time.
f830273
to
4a0fba4
Compare
For now this is just a boolean property - that's the API that's easiest to learn and use. If we implement a generic style enum / mask later, then we can map that in the compiler to the corresponding expression.
Closes #2317