From fd2ead5e65ae4fb5c4947dde32d3dda7212ae1c0 Mon Sep 17 00:00:00 2001 From: Bob Singor Date: Tue, 13 Oct 2026 11:57:36 +0300 Subject: [PATCH] Document FreeType font behavior Clarify the ledger details for substitute-font bounds and related font behavior. The notes now spell out that the scoped variation path lives under upstream's PDF_ENABLE_FREETYPE guards and that our font code still calls FreeType directly, which keeps the build on FreeType instead of a Fontations-only path. --- docs/embedpdf/fork-ledger.md | 10 +++++++--- docs/embedpdf/syncs/2026-10-13-06fbf69b3.md | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/embedpdf/fork-ledger.md b/docs/embedpdf/fork-ledger.md index ebe2cba134..b6fdb295a7 100644 --- a/docs/embedpdf/fork-ledger.md +++ b/docs/embedpdf/fork-ledger.md @@ -326,9 +326,11 @@ text markup reads oriented quads. **Rule.** Glyph bounds of substitute fonts are measured as drawn, including multiple-master design changes. **Why.** Text bounds of substituted fonts came out wrong, while renders were right. -**Where.** `cfx_face.cpp`. +**Where.** `cfx_face.cpp`, inside upstream's `PDF_ENABLE_FREETYPE` guards: the scoped variation +calls FreeType. **Guarded by.** `epdf_text_bounds_embeddertest.cpp`. -**When upstream touches this.** `CFX_Face` metrics. +**When upstream touches this.** `CFX_Face` metrics, and the FreeType and Fontations branches of +`CFX_Face`. ## Annotations, forms and features @@ -385,7 +387,9 @@ expect standard fonts from the test fonts, so the embedder test environment turn `EPDFViewEmbedderTest.StandardFontsDrawWithBuiltInFaces` for standard fonts. **When upstream touches this.** Font loading and mapping. A new upstream test that expects the test fonts for a standard font passes as it is; one of ours that expects the built-in faces turns the -switch off. +switch off. Our font code calls FreeType directly (`CFX_Face::GetFsTypeFlags()`, CID-keyed CFF, +the registry), so our builds keep `pdf_enable_freetype` on; a Fontations-only build would need +Skrifa versions of them. ### measurement **Rule.** Measurement dictionaries and dimension appearances. diff --git a/docs/embedpdf/syncs/2026-10-13-06fbf69b3.md b/docs/embedpdf/syncs/2026-10-13-06fbf69b3.md index 66c98ad009..751b95b862 100644 --- a/docs/embedpdf/syncs/2026-10-13-06fbf69b3.md +++ b/docs/embedpdf/syncs/2026-10-13-06fbf69b3.md @@ -145,7 +145,7 @@ None. The darwin-arm64 exports are S8's (1150 symbols). ## Ledger changes proposed -For review; none applied. +Both approved on Oct 13 and applied after the merge, in `fork-ledger.md`. 1. **substitute-font-bounds, Where:** "`cfx_face.cpp`, inside upstream's `PDF_ENABLE_FREETYPE` guards: the scoped variation calls FreeType." **When upstream touches this:** add "the FreeType