diff --git a/docs/format/fonts.md b/docs/format/fonts.md index c5fc7d8..1a4fea9 100644 --- a/docs/format/fonts.md +++ b/docs/format/fonts.md @@ -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 ``, 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 diff --git a/src/idml/attrs.rs b/src/idml/attrs.rs index 29effff..cca398a 100644 --- a/src/idml/attrs.rs +++ b/src/idml/attrs.rs @@ -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"); };