egui/crates/egui_demo_lib
Emil Ernerfeldt 29fa63317e
Fix text sizes being too small (#2069)
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.
2022-09-21 21:31:08 +02:00
..
benches Move all crates into a crates directory (#1940) 2022-08-20 10:41:49 +02:00
src Fix text sizes being too small (#2069) 2022-09-21 21:31:08 +02:00
Cargo.toml Release 0.19.0 - wgpu backend, repaint_after, continue-after-close 2022-08-20 16:49:58 +02:00
README.md Move all crates into a crates directory (#1940) 2022-08-20 10:41:49 +02:00

egui demo library

Latest version Documentation unsafe forbidden MIT Apache

This crate contains example code for egui.

The demo library is a separate crate for three reasons: