![]() Closes https://github.com/emilk/egui/issues/2068 Before this PR, the default font, Ubuntu-Light, was ~11% smaller than it should have been, and the default monospace font, Hack, was ~14% smaller. This means that setting the font size `12` in egui would yield smaller text than using that font size in any other app. Ooops! The change is that this PR now takes into account the ttf properties `units_per_em` and `height_unscaled`. If your egui application has specified you own font sizes or text styles you will see the text in your application grow larger, unless you go in and compensate by dividing all font sizes by ~1.21 for Ubuntu-Light/Proportional and ~1.16 for Hack/Monospace, and with something else if you are using a custom font! This effects any use of `FontId`, `RichText::size`, etc. This PR changes the default `Style::text_styles` to compensate, so the default egui style should look the same before and after this PR. |
||
---|---|---|
.. | ||
confirm_exit | ||
custom_3d_glow | ||
custom_3d_three-d | ||
custom_font | ||
custom_font_style | ||
custom_window_frame | ||
download_image | ||
file_dialog | ||
hello_world | ||
puffin_profiler | ||
retained_image | ||
screenshot | ||
serial_windows | ||
svg | ||
README.md |
egui
and eframe
examples
All the examples in this folder uses eframe
to set up a window for egui
. Some examples are specific to eframe
, but many are applicable to any egui
integration.
There are a lot more examples at https://www.egui.rs, and it has links to the source code of each example.
Also check out the official docs at https://docs.rs/egui and https://docs.rs/eframe.