1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Fix: allow using the full Private Use Area for custom fonts (#3509)

The ignored characters are used in some custom fonts.

for example: the \u{F0FF} is used as `cleaning_services` in
MaterialIcons-Regular.ttf

<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to add commits to your PR.
* Remember to run `cargo fmt` and `cargo cranky`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review you PR, but my time is limited!
-->

Closes <https://github.com/emilk/egui/issues/THE_RELEVANT_ISSUE>.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
Varphone Wong
2024-01-07 05:33:08 +08:00
committed by GitHub
parent 5a6d1cbd58
commit 932fdae9e6
2 changed files with 23 additions and 0 deletions

View File

@@ -335,6 +335,23 @@ impl FontDefinitions {
families,
}
}
/// List of all the builtin font names used by `epaint`.
#[cfg(feature = "default_fonts")]
pub fn builtin_font_names() -> &'static [&'static str] {
&[
"Ubuntu-Light",
"NotoEmoji-Regular",
"emoji-icon-font",
"Hack",
]
}
/// List of all the builtin font names used by `epaint`.
#[cfg(not(feature = "default_fonts"))]
pub fn builtin_font_names() -> &'static [&'static str] {
&[]
}
}
// ----------------------------------------------------------------------------