mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 23:00:04 -04:00
Choose your own font and size (#1154)
* Refactor text layout: don't need &Fonts in all functions * Replace indexing in Fonts with member function * Wrap Fonts in a Mutex * Remove mutex for Font::glyph_info_cache * Remove RwLock around Font::characters * Put FontsImpl and GalleyCache behind the same Mutex * Round font sizes to whole pixels before deduplicating them * Make TextStyle !Copy * Implement user-named TextStyle:s * round font size earlier * Cache fonts based on family and size * Move TextStyle into egui and Style * Remove body_text_style * Query graphics about max texture size and use that as font atlas size * Recreate texture atlas when it is getting full
This commit is contained in:
10
CHANGELOG.md
10
CHANGELOG.md
@@ -8,6 +8,11 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
|
||||
## Unreleased
|
||||
|
||||
### Added ⭐
|
||||
* Much improved font selection ([#1154](https://github.com/emilk/egui/pull/1154)):
|
||||
* You can now select any font size and family using `RichText::size` amd `RichText::family` and the new `FontId`.
|
||||
* Easily change text styles with `Style::text_styles`.
|
||||
* Added `Ui::text_style_height`.
|
||||
* Added `TextStyle::resolve`.
|
||||
* `Context::load_texture` to convert an image into a texture which can be displayed using e.g. `ui.image(texture, size)` ([#1110](https://github.com/emilk/egui/pull/1110)).
|
||||
* Added `Ui::add_visible` and `Ui::add_visible_ui`.
|
||||
* Added `CollapsingHeader::icon` to override the default open/close icon using a custom function. ([1147](https://github.com/emilk/egui/pull/1147))
|
||||
@@ -23,6 +28,10 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
|
||||
* For integrations:
|
||||
* `FontImage` has been replaced by `TexturesDelta` (found in `Output`), describing what textures were loaded and freed each frame ([#1110](https://github.com/emilk/egui/pull/1110)).
|
||||
* The painter must support partial texture updates ([#1149](https://github.com/emilk/egui/pull/1149)).
|
||||
* Added `RawInput::max_texture_side` which should be filled in with e.g. `GL_MAX_TEXTURE_SIZE` ([#1154](https://github.com/emilk/egui/pull/1154)).
|
||||
* Replaced `Style::body_text_style` with more generic `Style::text_styles` ([#1154](https://github.com/emilk/egui/pull/1154)).
|
||||
* `TextStyle` is no longer `Copy` ([#1154](https://github.com/emilk/egui/pull/1154)).
|
||||
* Replaced `TextEdit::text_style` with `TextEdit::font` ([#1154](https://github.com/emilk/egui/pull/1154)).
|
||||
|
||||
### Fixed 🐛
|
||||
* Context menu now respects the theme ([#1043](https://github.com/emilk/egui/pull/1043))
|
||||
@@ -533,6 +542,7 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
|
||||
* Optimization: coarse culling in the tessellator
|
||||
* CHANGED: switch argument order of `ui.checkbox` and `ui.radio`
|
||||
|
||||
|
||||
## 0.1.4 - 2020-09-08
|
||||
|
||||
This is when I started the CHANGELOG.md, after almost two years of development. Better late than never.
|
||||
|
||||
Reference in New Issue
Block a user