Files
egui/tests/egui_tests/Cargo.toml
T
Emil ErnerfeldtandClaude Fable 5.1 24c6061a58 Allow multiple GlyphRasterizers, with priority over installed fonts (#8545)
`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>
2026-09-10 13:09:13 +02:00

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