Conversation
|
It doesn't really help. I think the problem is mixing fonts that don't properly center the text in them. We could center on the visual bounds, but the problem with that would be that text would move vertically when you add new letters to a I think the code in this PR is still an improvement. You can tweak the problematic fonts on load with |
|
EDIT: oh wait i meant to apply that diff to 😮 i really got some different results.. + font_data.insert(
+ "Cantarell".to_owned(),
+ FontData::from_static(include_bytes!("/usr/share/fonts/truetype/Cantarell-VF.otf")),
+ );
families.insert(
FontFamily::Proportional,
vec










CenterandMaxvertical text alignment properlyThe end result is that text centers better in buttons and other places, especially when mixing in emojis.
Before, mixing text of different heights (e.g. emojis and latin text) in a label or button would cause the text to jump vertically.
Before
This is


master, with customFontTweakto move fonts up and down:After
This PR, with the default (zero)
FontTweak