mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-27 03:56:50 -06:00
Text: apply the Symbol encoding table only to the Symbol face
A Wingdings or Webdings face without private-use coverage no longer gets Symbol's mapping (0xD8 drew as ¬). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e5a407d6e2
commit
e294a09664
@@ -1342,6 +1342,10 @@ fn symbol_font_draw(face: &FontFace, code: u32) -> Option<char> {
|
||||
if face.covers(pua) {
|
||||
return Some(pua);
|
||||
}
|
||||
// The table below is the Symbol font's encoding; Wingdings, Webdings and the like are not Symbol.
|
||||
if !face.family.eq_ignore_ascii_case("symbol") {
|
||||
return None;
|
||||
}
|
||||
if let Some(real) = symbol_unicode(code) {
|
||||
return std::iter::once(real).chain(symbol_unicode_alts(code).iter().copied()).filter_map(char::from_u32).find(|c| face.covers(*c));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user