From 53d0e36533550c419f72ea9f30005d89dc0fe5d7 Mon Sep 17 00:00:00 2001 From: mtlcl410 <2368091+mtlcl410@users.noreply.github.com> Date: Sat, 24 Oct 2026 10:25:29 +0800 Subject: [PATCH] M10: the symbolic glyph-name patch is hayro-interpret patch 53 (#3962) main added hayro-interpret patches 51 and 52 (bounded saved graphics states, /W2 runs past the largest CID), so this branch's patch is now 53 in vendor/README.md; the code comments that cite it follow. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC --- crates/render/src/raster/tests.rs | 2 +- vendor/hayro-interpret/src/font/true_type.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/render/src/raster/tests.rs b/crates/render/src/raster/tests.rs index 5f1e18eecf..15793e7f16 100644 --- a/crates/render/src/raster/tests.rs +++ b/crates/render/src/raster/tests.rs @@ -1630,7 +1630,7 @@ fn rounded_pixel_budget_invalid_requests_never_reach_allocator() { /// order, 29 below ASCII; the font's own `cmap` maps them to the right glyphs. Read as WinAnsi /// the text came out shifted (`Solid` as `6ROLG`), in the editor and in Word export alike. The /// `post` table names the glyph each code selects, which gives the text (vendored -/// hayro-interpret patch 51). A font with an `/Encoding` still reads its codes through it. +/// hayro-interpret patch 53). A font with an `/Encoding` still reads its codes through it. #[test] fn a_symbolic_truetype_font_without_an_encoding_reads_its_glyph_names() { use skrifa::MetadataProvider; diff --git a/vendor/hayro-interpret/src/font/true_type.rs b/vendor/hayro-interpret/src/font/true_type.rs index 1d1686f083..d012e7c880 100644 --- a/vendor/hayro-interpret/src/font/true_type.rs +++ b/vendor/hayro-interpret/src/font/true_type.rs @@ -191,7 +191,7 @@ impl TrueTypeFont { match &self.kind { Kind::Embedded(e) => { - // PdfCraft patch (51): see `EmbeddedKind::symbolic_text`. + // PdfCraft patch (53): see `EmbeddedKind::symbolic_text`. if let Some(text) = e.symbolic_text(code as u8) { let mut chars = text.chars(); return Some(match (chars.next(), chars.next()) { @@ -230,7 +230,7 @@ struct EmbeddedKind { cached_mappings: RefCell>, /// PostScript name from the PDF. postscript_name: Option, - /// PdfCraft patch: (see vendor/README.md hayro-interpret (51)) the text each glyph's `post` + /// PdfCraft patch: (see vendor/README.md hayro-interpret (53)) the text each glyph's `post` /// table name stands for, for the names that stand for any (`glyph_name_text`). text_names: HashMap, } @@ -315,7 +315,7 @@ impl EmbeddedKind { .or_else(|| win_ansi::get(code)) } - /// PdfCraft patch (51): a symbolic font without an encoding selects its glyphs through its + /// PdfCraft patch (53): a symbolic font without an encoding selects its glyphs through its /// own `cmap`, so its codes need not mean anything in WinAnsi. FrameMaker files distilled /// with Distiller 3 number them in the Macintosh glyph order, 29 below ASCII, and read as /// WinAnsi `Solid` came out as `6ROLG` (#3962). The name the `post` table gives the glyph the @@ -461,7 +461,7 @@ pub(crate) enum Width { Missing, } -/// PdfCraft patch (51): the text a glyph name stands for, by the rules of the Adobe Glyph List +/// PdfCraft patch (53): the text a glyph name stands for, by the rules of the Adobe Glyph List /// specification, as pdfcraft-fonts' `glyph_text` reads them for the editor: drop any suffix /// from the first `.` (`a.ss01` is `a`), then each `_`-separated component is a list name, /// `uni` and groups of four hex digits, or `u` and four to six. `None` when any component is @@ -587,7 +587,7 @@ pub(crate) fn read_encoding(dict: &Dict<'_>) -> (Encoding, HashMap) mod tests { use super::glyph_name_text; - /// PdfCraft patch (51): glyph names read as pdfcraft-fonts' `glyph_text` reads them. + /// PdfCraft patch (53): glyph names read as pdfcraft-fonts' `glyph_text` reads them. #[test] fn glyph_names_read_by_the_adobe_glyph_list_rules() { for (name, expected) in [