-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
Egui default font with 0.21
:
Although a bit hard to see, all symbols are offset in the y direction. I tried different fonts such as IBM plex, and they show this as well.
Describe the bug
Symbols are not vertically aligned with text if using a custom font.
To Reproduce
Steps to reproduce the behavior:
pub fn new(cc: &eframe::CreationContext<'_>) -> Self {
let mut fonts = FontDefinitions::default();
fonts.font_data.insert(
"my_font".to_owned(),
FontData::from_static(include_bytes!("../res/fonts/NotoSans-Regular.ttf")),
// FontData::from_static(include_bytes!("../res/fonts/IBMPlexSans-Regular.ttf")),
);
fonts
.families
.get_mut(&FontFamily::Proportional)
.unwrap()
.insert(0, "my_font".to_owned());
cc.egui_ctx.set_fonts(fonts);
Default::default()
}
lictex