feat: decode font name flags, all font types and missing-font records

- FontType codes 0 Type1, 3 ATC and 0xFFFFFFFF Unknown.
- TypekitID from INDD version 9.2 (was 12).
- The key flag of the native style name gives FontStyleNameNative a
  $ID/ prefix; the key flag of the family name gives $ID/ to the family
  name in FontFamily, Font Name and every AppliedFont.
- Missing-font records (kind 3) parse: no fonts, or short font records
  with style, platform name and Unknown type.
- The family name in the font's own script replaces the name when the
  family's writing script is the script byte of the document users.

compare.py --exclude own/:
- trustworthy value coverage 97.36% -> 97.42% (+7,627 values); all
  pairs 95.35% -> 95.41% (+9,808)
- TypekitID +3,483, FontStyleNameNative +1,262, FontType +664, 196
  more Font elements matched, AppliedFont and BulletsFont +235
- extra values 26,348 -> 24,144 (Font elements whose Self now matches)
- warnings 413 -> 406 (missing-font records now parse)
- compare.py --all with schemas: 0 schema failures on pairs; files
  without a reference as before
This commit is contained in:
aiongg committed 2026-10-08 06:27:03 +00:00
1 parent 6f27a77b9b
commit b8ef0d51d8
11 files changed
+270 -35

No files matched your search

+10
View File
@@ -66,6 +66,16 @@ are in `big-endian.md`.
| 0x4C01 | UID list: sections |
| 0xA443 | Document users: u32 count, then per user a flag byte, the name as an in-object string, u32 colour |
**Script byte of the user names.** The second byte of each user name's
in-object string (the byte after the string tag) is a script code: 0
in documents in Latin script, 1 in all 9 trustworthy pairs with
Japanese user or assignment names, 7 in a Russian, 25 in a Simplified
Chinese and 29 in a Czech document. The same codes are font writing
scripts (1 for Japanese fonts, 25 for Simplified Chinese fonts). All
users of a document have the same byte, except in one pair with users
of bytes 0 and 7. The converter uses the byte of the last user to
choose font family names (`fonts.md`, native family names).
**Document users.** IDML lists one `DocumentUser` per user in chunk
0xA443, `Self` being `dDocumentUser` and the index in hexadecimal (491 of
495 trustworthy pairs have as many users as the chunk; the other 4 are