docs: use a generic example of a family name escape

This commit is contained in:
aiongg committed 2026-10-10 14:56:50 +00:00
1 parent 0a0c464995
commit 3122adfee5
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -274,7 +274,7 @@ composite font holds the UID of a font family (class 0x3E03) whose name
is the composite font's name; no `AppliedFont` value is the UID of the
0xCB02 object. The family name can contain escapes `<hhhh>`, four
hexadecimal digits of a UTF-16 code unit, for characters outside ASCII
(such as `<5927><6A19>`). Decoded, the name equals the composite font
(such as `<4E2D><6587>` for 中文). Decoded, the name equals the composite font
name: in the conversions of the 1,251 trustworthy pairs, families with
escapes are used in 27 documents, and in 24 their decoded name is one of
the document's composite fonts. The other escaped names (in 3
+3 -3
View File
@@ -1895,7 +1895,7 @@ mod tests {
5,
crate::model::FontFamily {
uid: 5,
name: "<5927><6A19>".into(),
name: "<4E2D><6587>".into(),
builtin: false,
native_name: String::new(),
fonts: Vec::new(),
@@ -1906,7 +1906,7 @@ mod tests {
uid: 9,
name: crate::model::Name {
builtin: false,
name: "\u{5927}\u{6A19}".into(),
name: "\u{4E2D}\u{6587}".into(),
},
entries: Vec::new(),
});
@@ -1938,7 +1938,7 @@ mod tests {
// An empty line style list is left out.
assert_eq!(names, ["AppliedFont", "AllGREPStyles"]);
assert_eq!(props[0].1, "object");
assert!(matches!(&props[0].2, PropValue::Text(t) if t == "CompositeFont/\u{5927}\u{6A19}"));
assert!(matches!(&props[0].2, PropValue::Text(t) if t == "CompositeFont/\u{4E2D}\u{6587}"));
let PropValue::List(items) = &props[1].2 else {
panic!("not a list");
};