mirror of
https://github.com/storytold/egui.git
synced 2026-11-19 17:12:28 +01:00
`GlyphRasterizer` now has a `FontPriority`:
* `FontPriority::Highest`: asked about every cluster, before any font.
Use it to override how specific glyphs looks
* `FontPriority::Lowest` (default): a fallback, only asked about
clusters no installed font (or `FontProvider`) has. Same as before.
Several rasterizers can be installed; within a tier they are asked in
order, and the first `Some` wins.
```rust
ctx.add_glyph_rasterizer(
egui::GlyphRasterizer::new(|request| (request.cluster == "…").then(|| my_ellipsis(request)))
.with_priority(egui::FontPriority::Highest),
);
```
API changes (all unreleased): `Context::set_glyph_rasterizer(Option)` →
`add_glyph_rasterizer` / `set_glyph_rasterizers(Vec)`, same on
`epaint::Fonts`.
Follow-up to:
* https://github.com/emilk/egui/pull/8512
* [x] I have followed the instructions in the PR template
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
24 lines
639 B
TOML
24 lines
639 B
TOML
[package]
|
|
name = "egui_tests"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
rust-version.workspace = true
|
|
version.workspace = true
|
|
|
|
[package.metadata.cargo-shear]
|
|
ignored = ["image"] # We need the png feature
|
|
|
|
[dev-dependencies]
|
|
# `monochrome_emoji_fonts` so that the snapshots keep their emoji:
|
|
egui = { workspace = true, default-features = true, features = [
|
|
"experimental",
|
|
"monochrome_emoji_fonts",
|
|
] }
|
|
egui_kittest = { workspace = true, features = ["snapshot", "wgpu"] }
|
|
egui_extras = { workspace = true, features = ["image", "svg"] }
|
|
image = { workspace = true, features = ["png"] }
|
|
|
|
[lints]
|
|
workspace = true
|