Repository navigation
v1.9.0 — conformance and fidelity: full UAX #9, 32 scripts, ToUnicode for every shaper, spot colours and the PDF/A + PDF/X dual claim, JPEG 2000, proven compatibility #98
Nizoka
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
pdfnative v1.9.0
Released 2026-10-30
The conformance and fidelity release. Every glyph of every shaper is extractable, bidirectional text follows the whole of UAX #9, five more Indic scripts join the engine (32 in all), the press gets spot colours and a file that is both PDF/A-2 and PDF/X-4, images gain JPEG 2000, embedded subsets shrink by an order of magnitude, and thirteen issues close. Underneath, the zero-breaking-change policy is proven on every pull request: the 1.8.0 test suite and API registry run against 1.9.0, Windows and macOS are required checks, and the release pipeline attests the bytes the registry serves. 100 % backward-compatible with v1.8.0 — no export removed or renamed, two calls behave differently by design (below), and output bytes move only where the previous output was wrong, each cause in the compatibility ledger.
Highlights
direction: 'auto'aligns right-to-left paragraphs to the right and justifies them in visual order; every line of the Unicode BidiCharacterTest passes (#92). → Right-to-left documentscps, Thai and Lao sara am carry/ActualTextuntagged, and level U is guarded byPDFA_GLYPH_WITHOUT_UNICODE(#84, #87)./Span /ActualText, what Chrome and Skia write, and so does every right-to-left run (its logical text, as Skia writes for reversed clusters);extractText()and every reader return the source string, an untagged Arabic or Hebrew line as typed;layout.actualText: falseopts out. A character no registered font covers is now named byTEXT_GLYPH_NOT_COVEREDinstead of silently becoming a box or a?./Separationinks and/DeviceNmixes with process alternates; PDF/A-2b or 2u and PDF/X-4 in one file;validatePdfX()reads inside XObjects. → Print guide/JPXDecodepass-through with the colour and opacity the codestream declares. → Images guide, Images playgroundcmapover the kept glyphs, a format-3post, nogasp. Noto Sans 108.9 → 6.3 KB and Noto Sans JP 275.0 → 9.6 KB for one paragraph;financial/sample-multi824.6 → 100.7 KB.compat-previousreplays the 1.8.0 suite (128 files, 2901 tests) against 1.9.0 on every pull request;api-compatholds the 503 exports, 9 diagnostics and 23 build errors of 1.8.0; Windows and macOS required; the parser surface fuzzed; the release pipeline at SLSA Build L2. → SECURITY.md §Compatibility promiseSecurity
sha256()and the SHA-512 core wrote only the low word of the FIPS 180-4 message length (CWE-682). An input of 2^29 octets (512 MiB) or more produced a wrong digest, silently; every shorter input was unaffected. Affects every release up to 1.8.0 for inputs of that size — document hashing for signatures over files above 512 MiB, and the AES-256 key derivation's hashes are far below the bound. Fixed bywriteBitLengthBE, shared by both cores, locked at the 2^29 boundary on the helper.),{or}spun the tokenizer forever (CWE-835). The keyword reader returned an empty token without advancing, so every token loop — the ToUnicode CMap reader among them — hung on a one-byte corruption of any PDF handed toextractText()or the reader. Found by the new fuzz targets; consumed as a one-byte keyword since 1.9.0.parseFontData()read past the end of a malformed font (CWE-125, aRangeErrorrather than a refusal). The reader is bounds-checked in both generators.v*tag before any approval, holdsid-token: writeonly where no dev-dependency code runs, installs nothing in the publishing job, pins the npm client by the SHA-512 of its tarball, restores no dependency cache, and attests the registry's bytes; CodeQL runssecurity-extendedwith theactionslanguage; Dependabot waits seven days; the workflows are linted on every pull request; the parser surface is fuzzed by ClusterFuzzLite.extractText()reports an over-cap stream instead of returning a page without its text (#89).npm audit --audit-level=highreports none. Nothing in the package changed: the samples are byte-identical. The lockfile was regenerated with npm 11.19.1 because npm 10.9 cannot rebuild the ideal tree of a project whose devDependency pdfnative-react declares a peer dependency on the project itself;npm ciunder npm 10.9 installs it cleanly.scripts/build-guides.ts(the guide pre-renderer, an authoring tool outside the package) decodes&last and strips tags to a fixed point — CodeQL js/double-escaping and js/incomplete-multi-character-sanitization, alerts 15 and 16; the 38 committed guide shells are byte-identical, and the helpers are held by a test.attestjob'scontents: write(attaching the files to the release) and itsnpm install pdfnative@<exact>(whatnpm audit signaturesverifies) are deliberate and documented in SECURITY.md §Code Safety; the code-review and best-practices-badge findings are acknowledged there too.Breaking Changes
None. See Upgrade for the two behaviour changes and the compatibility ledger.
Added
resolveBidiLevels(),bidiLineLevels(),bidiRunsForLine();layout.directionandParagraphBlock.direction(TextDirection);Bidi_ClassandBidi_Paired_Bracketgenerated from the UCD (npm run verify:unicodedrives four generators); a stratified BidiCharacterTest subset at the gate, the full file withBIDI_CHARACTER_TEST=<path>(#92).gu,pa,kn,ml,or;rephMode: 'logical',rephPosition: 'beforeSub' | 'afterMain', medial consonants, UCD-classified split matras, chillus; five Noto Sans modules pinned infonts/SOURCES.json; language documents, alphabet plates, visual fixtures.buildToUnicodeCMap(cmap, usedGids, overrides, encoded?);cpsfrom every shaper; untagged/Span /ActualTextfor Thai and Lao sara am (layout.actualText: falseopts out);PDFA_GLYPH_WITHOUT_UNICODE(#84, #87).print.spotColours(SpotColourDef),PdfSpotColor({ spot, tint? }),PdfInkMix({ inks }),/Separationand/DeviceNresources with tint transforms,scanDeviceColour().named.tagged: 'pdfa2b' | 'pdfa2u'withpdfx: 'pdfx4';pdfaid+pdfxidXMP with the PDF/X ID extension schema; two OutputIntents on one ICC stream.validatePdfX()inside XObjects — Form XObjects (own or inherited resources), images, and/Separation,/DeviceN,/Indexedalternates.imageblocks andwatermark.imageaccept JP2 files and raw codestreams;parseJPX(),JpxInfo,detectImageFormat() → 'jpx',ParsedImage.jpx;/SMaskInData 1for an opacity channel; PDF 1.5 header;PDFA1_JPX_IMAGE,PDFA_JPX_IMAGE; theimages/sample category.subsetTTF(ttf, gids, { lean: { cmap } })in both builders; every font module header carries the font's copyright statement; a registered font no character reaches embeds its.notdef-only subset with/W []instead of the whole program (C18).layout.actualText— untagged/Span /ActualTexton every left-to-right shaped run whose glyph order differs from its text (C20),falsefor the bare runs;EncodingContext.actualText.TEXT_GLYPH_NOT_COVERED— one diagnostic per font naming the code points drawn as.notdefin a CID run or written as?by the base-14 WinAnsi path (toWinAnsi(str, onMiss?),pdfString(str, onMiss?),EncodingContext.getUncoveredCodepoints()); the bytes are unchanged,strictthrows,docs/data/errors.jsoncarries the entry.ChartSeries.colors— one colour per value onbar,barH,stackedBarandstackedBarH; the legend swatch keeps the seriescolor; a length mismatch throws; byte-identical when absent.ColumnDef.kind: 'amount', U+202F on the base-14 path, page transparency groups,/Scope+/Headers+/IDTreefor tagged tables withvalidatePdfUA()rules.decodePdfTextString()(#85);PdfStreamLimitError(PDF_STREAM_LIMIT) andextractText({ onStreamError })(#89).composeLtvData()(LtvMaterial,ComposeLtvOptions,match: 'all' | 'chain');parseOcspResponse()exposes the CertID;ocspResponseMatchesCertificate()(#90).{ type: 'link' }markup annotations (#91); feat(crypto):ecdsaVerifyHash,ecdsaSignHash,encodeDerSignature,decodeDerSignature(#88); feat(tools):buildSyntheticGrayProfile(),buildSyntheticCmykProfile()onpdfnative/tools(#86); feat(chart): optionalChartSeries.label(#82).validate:pdfacovers PDF/X — every sample whose XMP carriespdfxid:GTS_PDFXVersionis held tovalidatePdfX()in the publish gate and in the regression suite (veraPDF never covers PDF/X); thepdfaiddetection also reads the attribute form;declared.pdfxSamplesis the second coverage canary.compat-previous(npm run compat:previous,scripts/run-compat.ts,tests/compat/),tests/tools/api-compat.test.ts, Windows and macOS required checks,workflow lint(zizmor 1.30.1, actionlint 1.7.12),runtimessmoke (Deno 2.9.7, Bun 1.4.2, Chromium),node-current(Node 26), weeklybench, ClusterFuzzLite with seven targets (fuzz/), the guard → build → publish → attest pipeline;.github/rulesets/main.jsonlists the seven required contexts.rtl-document,jpx-image,spot-colours,dual-pdfa-pdfx,annotate-link,extract-roundtrip,ltv-compose-offline); samplesbidi/bidi-uax9-conformance,tagged/tagged-pdfa2u-taitham,images/*,print/print-spot-colours,print/print-dual-pdfa2b-pdfx4,print/print-gray-pdfx4; SECURITY.md §Supported runtimes and §Compatibility promise.Changed
tibt/khmr/mymr+mym2/lana/chamlayout tables kept by both generators; the Tibetan, Khmer, Myanmar, Tai Tham and Cham modules rebuilt.extractText()throwsPdfStreamLimitErroron an over-cap stream by default (#89).scanDeviceColour()gainsnamed(C16);buildPDFhonoursColumnDef.kind: 'amount'once any column declares a kind.validatePdfX()also reads the type-4 tint transforms of the Separation and DeviceN spaces the content selects (ISO 32000-1 Table 42 operators, procedures only underif/ifelse)./CIDToGIDMap /Identityas before), sohmtx,locaandmaxpcover the kept glyphs only; every font module header carriesCopyright:(C15); an unused registered font is a.notdef-only stub (C18)./Span /ActualText(C20): Indic, Sinhala, Khmer, Myanmar, Tai Tham, Cham and the Thai and Lao clusters whose tone mark precedes a below vowel;extractText()returns the logical string from an untagged document;layout.actualText: falserestores the 1.8.0 runs. Tagged output is unchanged — its structure spans already carried the text, and the tagged emitters no longer nest a second span for sara am. Every untagged right-to-left run carries its logical text the same way (C27), so an Arabic or Hebrew line extracts as typed from an untagged document too.verify:bundlebudgets re-measured: theparseColorprobe moved from 4 to 6 KB because thePdfColorunion gained spot colours and ink mixes the parser must read (4.2 KB at 1.9.0, 2.6 KB at 1.8.0); the other two probes are unchanged.ci.yml,codeql.ymland the publish workflow lost their path filters;setup-verapdfreturns its directory as an output; every audit-modeharden-runnercarries a dated reason; the FAQ and the pipeline say SLSA Build L2.pdfnative-build-emoji-font --downloadrefuses a font whose SHA-256 differs from the tested build (it used to warn and proceed);--allow-unverifiedkeeps the old behaviour,--ttftakes a file you verified yourself. The fuzz engine's lockfile licences (BlueOak-1.0.0, CC-BY-4.0, dev-only) are allow-listed for the dependency review; the runtime-smoke server resolves every served path under the repository root; font table maps use a null prototype..gitattributeshad declaredeol=lfover since 1.8.0 are rewritten in one dedicated commit (listed in.git-blame-ignore-revs; nothing but carriage returns changed), and theverify:docsruleeol-lfnow fails on a CRLF blob instead of warning. The generated Unicode data modules anduse-engine.tscarry a/*! @license */block so the Unicode, Microsoft and HarfBuzz notices reachdist/(a plain comment never did);verify:bundleprobes measure code without legal comments.Fixed
inspectDocumentLayout()agrees with the build.labelthrew aTypeError; legend width measured with the context's metrics in Unicode mode (#82)./Info, outlines, page labels and signature/T; non-Latin-1 text written to/P,/T,/V,/Optno longer truncated (#85).extraCertificatesreferenced from every/VRI(#90); an annotation type outside the union throws (#91).prefand a ligature swallowing its base in the Indic engine.repeat, which is not an ISO 32000-1 Table 42 operator — Acrobat refused the page ("Invalid Function resource") of every document painting an{ inks }mix. The type-4 function now pops the tints one by one and leaves the clipping to/Range(§7.10.1); the/DeviceNarray carries a/Colorantsattributes dictionary (ISO 19005-2 §6.2.4.4, veraPDF PASS for a mix under PDF/A-2b);validatePdfX()reads every type-4 tint transform the content selects and reports an operator outside Table 42 or a procedure outsideif/ifelse.print/print-spot-coloursregenerated.bidi/bidi-uax9-conformance). Every fallback run is measured with the AFM widths now. — C17/ToUnicodeand Odia ୈ left a glyph without a Unicode value (PDFA_GLYPH_WITHOUT_UNICODEunder level U). Each part now names its code point of the canonical decomposition (ୋ → U+0B47 U+0B3E): every glyph is mapped, and the extracted text is the NFD form, whichnormalize('NFC')turns back into the source. Folded into C4.PdfStreamLimitErrorpointed every filter atsetMaxInflateOutputSize(), which only moves the FlateDecode cap; the ASCIIHex, ASCII85, LZW and RunLength decoders carry a fixed 256 MiB cap of their own, and the message now names the remedy that applies (onStreamError: 'skip'). Classify bycode === 'PDF_STREAM_LIMIT', not by the text.parseFontData()bounds — see Security.financial/sample-multicarried twenty-two unused programs (12.5 MB for one page) andtagged/tagged-pdfa2u-taithamthe 2 MB Noto Sans variable font it never drew. Both builders now embed the.notdef-only lean subset with/W []; the font object, its descriptor and ToUnicode stay (ISO 19005-2 §6.2.11.4.1 wants a program behind every referenced font), object numbering is unchanged. — C18halant_group); the glyph names the three code points it came from. — C19.notdefbox inshaping/shaping-tamil(the Tamil font), a silent?on the base-14 path in six others;diverse/diverse-medical-hiwrote a Greek mu the Devanagari font lacks for µL. Found byTEXT_GLYPH_NOT_COVEREDon the firsttest:generatethat carried it.नई दिल्लीraisedPDFA_GLYPH_WITHOUT_UNICODEunder level U andइकाईextracted asइक ाइर्. Every piece of a multiple substitution names the source code point now, and the run carries its text as/ActualText(C20).'/Spot_Name 1') accepted any non-blank name; it is held to the name alphabetpdfNameEncodewrites, so no delimiter can reach the content stream.{ spot }values were always validated against the declaration.extractText()spaced the letters of wide glyphs — the word-gap heuristic estimated the previous run's width at half an em per character while the decoder had computed the exact/Wadvance, so a Malayalam, Kannada or Khmer letter wider than 0.75 em drawn in its own text object (അവൻ→അ വ ൻ) earned a space. Each run carries its measured width now./ActualTextonce per glyph — Ctrl+A / Ctrl+C in Acrobat Reader onfinancial/sample-multireturned รายการไทย nine times and हिन्दी लेनदेन twelve times (one copy perBT … ETunder the cell's span), the Arabic cells as twelve interleaved fragments, and a Tai Tham paragraph line oftagged/tagged-pdfa2u-taithameighty-one times;extractText()and Chrome, which apply the span once, never showed it. A line or cell is now one text object:Tfswitches the fonts inside it, every shaped run is oneTJarray whose numbers place the glyphs (the/Wadvance against the layout's pen — GPOS offsets, zero-advance marks, the justification gap after a space), and only a mark with a vertical offset keeps aTd+Tjof its own inside the same object — the structure Skia and Chrome write. — C25document/doc-odiadrew ଶିରୋନାମା with the composed ୋ glyph (Noto's dotted-circle form) in front of ର and ଗୋଟିଏ with a gap,document/doc-gurmukhidrew ਲਾਇਬ੍ਰੇਰੀ with an explicit virama — while every table row, danda-free, was right. The Devanagari entry now detects the Script property (the danda and double danda are Common, the Vedic tone marks U+0951–U+0954 Inherited, as HarfBuzz itemises);containsDevanagari()keeps its block-wide meaning. — C26workflow_dispatchcan no longer publish; the attest job attests the registry's bytes, not a rebuild;package-manager-cache: falseon every release setup-node; the multi-language sample had been silently skipped by a stale script-count guard and is generated again.Performance
locaandhmtxentries in place — 147.6 KB for three Japanese characters of a 17 936-glyph face; the compact order (C28) removes them:financial/sample-multicarries 57.9 KB of fonts instead of 781.1 KB.Documentation
images/samples.buildSyntheticCmykProfile()frompdfnative/toolsinstead of fetching a profile), per-bar colours (charts),TEXT_GLYPH_NOT_COVERED(typography), alinkannotation (authoring), right-to-left paragraphs underdirection: 'auto'(extreme scripts), the five Indic scripts in the world tour (all scripts), a paginated table of contents (toolkit), a JPEG 2000 watermark (images), anddecodePdfTextString(),onStreamErrorand a tagged table (inspect). The printerrorspreset no longer tries the dual claim as an error.verify:docsgainsrelease-coverage: every export added since the previous release must be exercised by a playground, imported by a recipe or exempted with a reason indocs/data/playgrounds.json— none of the 39 exports of this release was in any playground manifest before.onStreamError), tables (descenders, header semantics), annotations (link), LTV (composeLtvData), charts (optional label), PDF/A (level U, images, the dual claim), typography (U+202F on base-14), signatures (ECDSA exports), accessibility (/Scope,/Headers,/IDTree), troubleshooting (RTL), FAQ (SLSA Build L2, CodeQL);docs/data/errors.jsoncarries every new code and message;docs/assets/api.jsonat 542 exports; the agent brief has a 1.9.0 section; SECURITY.md, CONTRIBUTING.md and the testing and font-engineering instructions describe the compat replay, the fuzz targets and the lean embeds.signPdfBytesWithTimestamp, zipnative packs then reads back; no Web Crypto key "signs" throughsignPdfBytes()); the architecture map names the 1.9.0 modules and draws the parser ⇄ core pair instead of an inflate edge that never existed; the OG and GitHub social images are re-rendered at 32 scripts; the learn path and the playgrounds index carry the 1.9.0 counts and links; two homepage live examples (right-to-left paragraphs, spot colours); the companion use-case guides and diagrams say which limits are the companions' and which the engine lifted; THIRD-PARTY-NOTICES.md reproduces the Unicode v3, MIT (Microsoft USE override tables) and Old MIT (HarfBuzz — the transcribed USE cluster grammar) texts and names every generated module and CDN load;docs/data/surfaces.jsonand the choose guide gain spot-colour, JPEG 2000 and right-to-left rows;verify:docsgainsjsonld-item-count,social-image-fresh, a page-backedrelease-coverageand a widercount-tokens(41 rules),release-preparespares historical prose andsitemap-lastmod-vs-githonours.git-blame-ignore-revs.Install
Upgrade
No public API was removed or renamed;
tests/tools/api-compat.test.tsholds every 1.8.0 export, diagnostic code and build-error message to the current registries, and the 1.8.0 test suite itself passes against 1.9.0 (npm run compat:previous: 128 files, 2901 tests; twenty exclusions for the reasons listed intests/compat/allow-1.8.0.json). Drop-in replacement for v1.8.0 for every program that does not rely on the two behaviours below, and output is byte-identical for existing inputs except where the previous output was wrong — each cause is a numbered ledger entry, and every moved sample is re-anchored to 1.9.0 intests/regression/baselines/samples.sha256.json(166 of 292 moved, 126 carried forward, 19 added).Two calls behave differently:
extractText()throwsPdfStreamLimitError(codePDF_STREAM_LIMIT) when a stream exceeds the inflate cap, instead of returning the page without its text. PassonStreamError: 'skip'for the 1.8.0 lenience, or'throw'to report any undecodable stream (#89). — C13buildDocumentPDFBytes()/buildPDFBytes()accepttagged: 'pdfa2b' | 'pdfa2u'next topdfx: 'pdfx4'. The single 1.8.0 refusal (layout.pdfx and layout.tagged cannot be combined …) became two level-specific messages, for PDF/A-1b and PDF/A-3b; code that matched on the old text must match the new ones (docs/data/errors.json). — C14Compatibility ledger — deliberate output changes, each wrong before:
bidi/*,doc-arabic,doc-hebrew,doc-persian,doc-urdu, the Arabic and Hebrew alphabet plates,extreme/*bidi*) is re-anchored.LRE,RLE,LRO,RLO,PDF) resolve with the standard's levels and directions; the 1.3.0 "lite forcing" that stripped inner controls and kept overridden Arabic in logical order is gone.bidi/bidi-embeddings-showcasere-anchored.cps, untagged Thai and Lao sara am carry/Span /ActualText(#84, #87). Every sample embedding a CIDFont re-anchors its/ToUnicodestream.tables/*,doc-myanmar,doc-khmer,doc-thai, the financial and multi-font samples re-anchored where such text sits in a table.FontFile2carries acmapover the kept glyphs, a format-3postand nogasp(outlines, metrics, names and hinting untouched): every sample embedding a bundled font changes bytes and shrinks.positionMarkOnBaseand the Khmer, Myanmar, Tibetan and USE shapers read every anchor triple, Tibetan runs on the OpenType engine, and the Tibetan, Khmer, Myanmar, Tai Tham and Cham modules carry their layout tables (#81).doc-tibetan,doc-khmer,doc-myanmar,doc-taitham,doc-cham, their alphabet plates and the shaping showcases re-anchored; the visual baselines of arabic, doc-devanagari, doc-telugu, doc-bengali, doc-lao and doc-thai regenerated.charts/*with CIDFont legends shift by the difference.toc/*sample with long contents re-anchored; a fitting TOC is byte-identical.punctuationSpacing: 'fr') is aTJadjustment of 167/1000 em instead of an ordinary space; the Frenchtypography/*samples re-anchored./Group << /S /Transparency /CS … /I true >>;watermark/*andemoji/*re-anchored; never under PDF/A-1./THcarries/A << /O /Table /Scope /Column >>and an/ID,/TDnames its headers,/StructTreeRootregisters an/IDTree; every tagged sample with a table re-anchored.scanDeviceColour()reportsnamed, the/Separationand/DeviceNnames a stream selects; an added field, every 1.8.0 field unchanged.(pdfnative library), an overlap after%, right-aligned lines short of the margin. Every such run now advances by the AFM width, whatevertypography.metricssays (the pure base-14 path keeps its'approximate'default). Every document mixing a registered non-Latin font with uncovered Latin text re-anchors:bidi/*,doc-arabic,doc-hebrew,doc-persian,doc-urduand the other language documents without a Latin module,extreme/*bidi*, the multi-font showcases; a document with a Latin module registered, or Latin-only, is byte-identical..notdef-only lean subset with/W []instead of the whole program; its five objects stay and the numbering does not move.financial/sample-multi,tagged/tagged-pdfa2u-taithamandbidi/bidi-arabic-shaping(a Hebrew module registered without Hebrew text) re-anchored; a document whose every registered font is used is byte-identical.halant_group = z? H (ZWJ N?)?): Malayalam ന് ല് ര് ള് ണ് draw the chillu glyph of ൻ ൽ ർ ൾ ൺ through the font'sakhnfeature (Noto Sans Malayalam has no rule for ൿ, which keeps its chandrakkala), Devanagari क् takes its half form (the chillu glyph names its three code points, the half form its two — the joiner leaves no glyph). Inside a syllable the same rules hold: a ZWJ after a halant stops the base search (त्र is half ta + ra, not ta + rakar), a pre-base sign is not placed after such a halant (ट्यि), and a nukta between the consonant and the halant keeps the request (क़्); Sinhala keeps its virama + ZWJ conjunct rule. No existing sample carried the sequences;shaping/shaping-malayalamis added./Span /ActualTexton every left-to-right shaped run whose glyph order differs from its text — an Indic pre-base vowel sign or reph, a split vowel sign reported as its NFD parts, a Khmer or Myanmar pre-base vowel, a Thai or Lao cluster whose tone mark is set before a below vowel; what Chrome and Skia write, and what makesextractText()and every reader return the source string in logical order. Right-to-left runs are left alone (readers reverse them through the bidi algorithm; an Arabic run's text is already visual). The tagged emitters pass their structure span's text and never nest a second span, so a tagged sara am document loses one redundant span.layout.actualText: falseopts out. Re-anchored: every untagged sample with Indic, Sinhala, Khmer, Myanmar, Tai Tham, Cham, Thai or Lao text —alphabet/*anddocument/doc-*of those scripts,shaping/*,extreme/*,financial/sample-hi,financial/sample-th,compression/compressed-thai,diverse/diverse-medical-hi,diverse/diverse-recipe-th,currency/currency-multi,font/font-subsetting-multiscript,document/doc-multi-language./BaseFontand/FontNameof every embedded subset readABCDEF+NotoSans-Regular, the tag derived from the face name and the kept glyph set (deterministic — the same text gives the same tag). Preflight tools and font-merging RIPs read it to tell two subsets of one face apart. Under PDF/A-1 the name stays bare: ISO 19005-1 §6.3.5 asks a tagged CIDFont subset for a/CIDSetstream the builders do not write yet (roadmap), and veraPDF 6.3.5-3 fails without it. Every sample embedding a font outside PDF/A-1 re-anchors; glyphs, widths and programs are unchanged.POS_BEFORE_SUB): every above and below sign and the short right signs (Kannada ಾ ು ೂ, Telugu up to ూ) follow the base directly, so the font's consonant + sign ligature forms when the consonant carries a subscript — ಕ್ಕಿ, ಸ್ತ್ರೀ, ಪ್ರೀತಿ, క్కి. Before, the sign followed the subscript: a spacing ಿ in Kannada, a Telugu ి drawn 483 units to the right of its consonant. ೃ ೄ ృ ౄ and the length marks keep their place after the subjoined consonants.alphabet/alphabet-kannada,alphabet/alphabet-telugu,document/doc-kannada,document/doc-telugu,shaping/shaping-telugu, the multi-script showcases and the Kannada and Telugu visual fixtures re-anchored.VPrebeforePRE_C): ကြေ, မြေ drawေ ြ က; ကြွေ, မြွေ keep the wa on the base instead of a cluster of its own.document/doc-myanmar,alphabet/alphabet-myanmar,shaping/shaping-myanmarandshaping/use-lite-clustersre-anchored where such words occur.decompose_khmerdoes — the pre-base េ, then the sign itself — and the sign's presentation glyph goes through the font'sabvf/pstssingle substitution: ើ ends in the anchored above mark ី, ៅ ឿ ៀ in their hooks, ោ in ា as before. Until now ើ ៅ ឿ ៀ were drawn with the right part of ោ, ី, ឹ, so ទៅ read ទោ and ដើម្បី read ដោម្បី.document/doc-khmer,shaping/shaping-khmer,font/font-subsetting-multiscript,document/doc-multi-languageand the Khmer visual fixture re-anchored (the alphabet plate lists the signs alone and does not move).txt(),txtJustified()and the tagged emitters write a line or cell as a singleBT … ET:Tfchanges the font inside it, each run after the first is placed by aTdrelative to the line origin, a shaped run is oneTJarray (its numbers are the difference between the viewer's/Wpen and the layout's pen: GPOSdx, a zero-advance mark, the justification gap after a space, rounded as written and fed back so nothing drifts), and a mark with a vertical offset is aTd+Tjof its own inside the same object. Until now every shaped glyph was its ownBT … ET, so a/Span /ActualText— the structure span of every tagged cell, the untagged C20 span — wrapped as many text objects as glyphs, and a reader that applies the span once per text object (Acrobat Reader; Chrome andextractText()apply it once per span) pasted the cell's text once per glyph. A single-run line keeps its bytes (BT /F3 9 Tf x y Td <…> Tj ET), and so does the base-14 path; re-anchored: every sample with a shaped run (Thai, Lao, Arabic, the Indic scripts, Sinhala, Tibetan, Khmer, Myanmar, Tai Tham, Cham, the Latin combining-mark shaper) or a line whose runs change font —alphabet/*anddocument/doc-*of those scripts and of Armenian, Georgian and Cyrillic,bidi/*,shaping/*,extreme/*,emoji/*,financial/sample-ar|he|hi|th|multi,diverse/*,compression/compressed-arabic|thai,currency/currency-extended,font/font-subsetting-multiscript,math/math-symbols,stress/doc-extreme-bidi-wrapping,tagged/tagged-pdfa2u-taitham(89 of 311); the twenty-two visual baselines regenerated (the test extractor replaysTJand relativeTdand places every glyph by the page's/W; the eighteen fixtures of shaped scripts differ from the former baselines by under one per cent of pixels — the former per-glyph positions reproduced — and the Latin fixtures by the exact advances the old rasteriser estimated at half an em).SCRIPT_SHAPERSdetects Devanagari by the Unicode Script property (containsDevanagariScript): the danda and double danda U+0964–U+0965 areScript=Commonand the Vedic tone marks U+0951–U+0954Script=Inherited, so they belong to the script around them, as HarfBuzz itemises runs. A line of Odia, Gurmukhi, Gujarati, Kannada or Malayalam ending in « । » reached the Devanagari configuration (first match wins, Devanagari precedes the 1.9.0 scripts) and lost its split vowel signs, conjuncts and subjoined forms; the font's composed ୋ glyph, drawn around a dotted circle, stood in front of ର.containsDevanagari()andisDevanagariCodepoint()keep their block-wide meaning. Re-anchored:document/doc-odia,document/doc-gurmukhi,document/doc-multi-language,document/doc-showcase-all-blocksand the Odia and Gurmukhi visual baselines; a line without a danda, and Devanagari text with one, are unchanged./Span /ActualTexton every right-to-left run. Every run cut from an odd-level bidi run names it (TextRun.bidi: the run's index on its line and its logical text), andtxt()and the justified emitters wrap the runs of one such bidi run in a single span carrying that text, inside the line's text object (C25) — what Skia writes for every reversed cluster, so Acrobat Reader, Chrome andextractText()paste an untagged Arabic or Hebrew line as typed (السلام عليكم, notةيبرع ةلماعم). A line mixing directions extracts its runs in geometric order with each right-to-left run logical, as a Chrome-printed page does; the tagged emitters keep their one structure span;layout.actualText: falseswitches this off with C20. The replacement runextractText()makes of a span now measures the width its glyphs took, so the word gap after it is judged on real advances. Re-anchored: every untagged sample with right-to-left text —bidi/*,document/doc-arabic|hebrew|persian|urdu, the Arabic and Hebrew alphabet plates,financial/sample-ar|he,extreme/*bidi*,compression/compressed-arabic,currency/currency-multi,font/font-subsetting-multiscript,document/doc-multi-language,stress/doc-extreme-bidi-wrapping. (The 1.9.0 review's P-08; the reviewer's copy offinancial/sample-multi, a tagged file whose cells already carried the text, came out of a reader that applies its own reversal — that sample's bytes move only through C28.)EncodingContext.getCidMaps(), CID 0 =.notdef), the content streams show them by those codes, andsubsetTTF(ttf, gids, { lean: { cmap, cids } })renumbers the embedded program in that order —glyf,loca,hmtx,hhea.numberOfHMetricsandmaxp.numGlyphsover the kept glyphs (the components of a composite appended and its references rewritten), thecmapto the new ids — so glyph i is CID i under the unchanged/CIDToGIDMap /Identity;/Wis one contiguous group from CID 1 and ToUnicode is keyed by CID. Until now the subset retained the source glyph ids, which cost eight bytes per glyph of the source font whatever the document used:financial/sample-multicarried 781 KB of fonts for one page (254 KB for fifteen Chinese glyphs), as LibreOffice, cairo, FOP and pdfTeX never would. The feature and kerning wrappers map codes back to glyph ids through the context, sofontFeaturesandkerningoutput is unchanged in rendering; the derived Latin source fonts, the simple TrueType of form fields and the two-argumentsubsetTTFcall are byte-identical. Every sample embedding a CIDFont re-anchors (its codes,/W, ToUnicode and program), and so do the glyph-position baselines of the visual suite (their glyph ids are CIDs now; the rendered pixels are unchanged).document/doc-showcase-all-blockssays 32 scripts;document/doc-multi-languageis generated again (it had been skipped by a stale guard since the five Indic scripts joined) and carries them;financial/sample-multiregisters the ten fonts its rows use and is tagged (PDF/A-2b,/Table/TR/TH/TDwith/Scope, every cell's text as/ActualText), so its Arabic, Hebrew and Hindi cells extract column by column in logical order — 25 PDF/A-claiming samples now;tagged/tagged-pdfa2u-taithamregisters the Latin face first so its English prose is set in Noto Sans;print/print-spot-colourspaints each plate of its ink-coverage chart in that plate's ink (ChartSeries.colors); six samples replace an arrow no font covers with words or=(shaping/shaping-tamil,compression/compressed-encrypted-aes128,crypto/crypto-showcase,parser/parser-xref-chain,signature/digital-signature-info,font/font-subsetting-overview) anddiverse/diverse-medical-hiwrites µL with the micro sign;shaping/shaping-malayalamis new (311 samples).Known limits, documented in the guides: the Indic engine's five new scripts are held by golden tests against the bundled fonts, the regenerated visual fixtures and a HarfBuzz-referenced review of every sample word, not yet by a native reader — reports welcome; neither the catalog nor the structure tree carries
/Lang, and rules and table borders are not marked/Artifact, so a tagged file passes PDF/A-2 but not yet PDF/UA-1 (1.9.1); a Thai above vowel + tone mark pair may extract in geometric order (ตั้ง→ตัง้; the ToUnicode is right and the C20 span covers reordered clusters); the untagged/ActualTextof a right-to-left run (C27) covers that run, so a line mixing directions extracts its runs in geometric order, each run logical (what a Chrome-printed page gives),ps()text (a watermark, a form label) carries no span, and a colour-emoji run inside a right-to-left run ends its span early; a mark with a vertical GPOS offset (a Thai tone mark on an above vowel, a stacked Indic sign) is its ownTjinside the line's text object (C25) — a reader that applied/ActualTextonce per text-showing operator rather than per text object would repeat the span's text for it; a colour-emoji run (a Form XObject) closes the text object and the runs after it open another; the Thai and Lao shapers set a tone mark before a below vowel in the content stream (canonically equivalent, covered by the span, unchanged in rendering); colour bars paint process inks only; PDF/A-1 and PDF/A-3 do not combine with PDF/X-4; JPEG 2000 is passed through, never decoded (theimages/*fixtures are flat mid-grey codestreams by design).Downstream integration notes
For pdfnative-cli, pdfnative-mcp and pdfnative-react, which pin
^1.8.0and therefore resolve to 1.9.0:PdfColorgainsPdfSpotColor({ spot, tint? }) andPdfInkMix({ inks });PdfColorSpacegains'separation' | 'devicen';detectImageFormat()may return'jpx';ParsedImage.filtermay be'/JPXDecode'andParsedImage.jpxis set for a JPEG 2000 image;ChartSeries.labelis optional andChartSeries.colors(one colour per value, bar charts) is new;MarkupAnnotationgains thelinkmember;PdfDiagnosticCodegainsPDFA_GLYPH_WITHOUT_UNICODE,PDFA1_JPX_IMAGE,PDFA_JPX_IMAGE,TEXT_GLYPH_NOT_COVERED(a character no registered font covers — a wrapper that surfaces diagnostics now reports boxes and?substitutions it used to pass silently);toWinAnsi()andpdfString()take an optional second argument;EncodingContextgainsgetUncoveredCodepoints(),actualTextandgetCidMaps(), andcreateEncodingContext()takesactualTextas a sixth optional argument;TextRungainsbidi(the right-to-left bidi run a run belongs to and its logical text, C27) andcids(the codes of a shaped run's glyphs, C28); a subset font's/BaseFontand/FontNamecarry the six-letter tag (ABCDEF+NotoSans-Regular, C21) — a wrapper that lists or matches font names should strip^[A-Z]{6}\+.financial/sample-multiis tagged now) — a downstream canary that counts them moves from 310 / 24.direction('auto' | 'ltr' | 'rtl', also per paragraph),print.spotColours,actualText(opt-out), thepdfx+tagged: 'pdfa2b' | 'pdfa2u'combination;extractText({ onStreamError }).PdfStreamLimitError/PDF_STREAM_LIMITfromextractText()and the decode filters — a wrapper that mapped an empty page to "no text" now receives an error for an over-cap stream. Replaced message: the single PDF/A + PDF/X refusal is now one message per excluded level (docs/data/errors.json).decodePdfTextString,composeLtvData(+LtvMaterial,ComposeLtvOptions),ocspResponseMatchesCertificate,ecdsaVerifyHash,ecdsaSignHash,encodeDerSignature,decodeDerSignature,resolveBidiLevels,bidiLineLevels,bidiRunsForLine,parseJPX,JpxInfo,TextDirection,PdfSpotColor,PdfInkMix,SpotColourDef,PdfStreamLimitError; onpdfnative/tools:buildSyntheticGrayProfile,buildSyntheticCmykProfile(pdfnative-cli can drop its vendored copy). 39 exports added, none removed (542 indocs/assets/api.json).gu,pa,kn,ml,or→noto-gujarati,noto-gurmukhi,noto-kannada,noto-malayalam,noto-oriya; hand-enumerated surfaces (pdfnative-cli--fontallow-list and--stricthelp, pdfnative-mcplangenum, pdfnative-react font map) should add them. Script count 32, module count 36..jp2,.j2k,.jpx; PDF/A-1 flags them withPDFA1_JPX_IMAGE(a warning; an error understrict).print.spotColours; a JSON DocSpec carrying{ spot }colours without it is refused with a named error. A/DeviceNarray has five elements (the attributes dictionary with/Colorantsis the fifth); a tool that reads the array shape should not assume four.PdfStreamLimitError.messagediffers between FlateDecode (setMaxInflateOutputSize()) and the fixed-cap filters (onStreamError: 'skip'); classify bycode, never by the text.annotate_pdf/annotatecan offerlinkwithurl. LTV:add_ltvcan take offline material throughcomposeLtvData(match: 'chain' | 'all').Copyright:header line; the Tibetan, Khmer, Myanmar, Tai Tham and Cham modules carryotlfor their scripts); consumers that vendor module files should refresh them.textRuns(),ps()and the content streams show a font's glyphs by CIDs allotted in order of first use, and the embedded subset is renumbered so glyph i is CID i. A tool that resolved a code through the font module'swidthsorcmapreads the embedded program, orEncodingContext.getCidMaps(), instead; a tool that reads the PDF alone sees an ordinary Identity-H CIDFontType2 whose/Wstarts at CID 1./W, ToUnicode, program), every untagged document with right-to-left text (C27, a/Span /ActualTextper right-to-left run), every right-to-left document (C1–C3), every untagged document with Indic, Sinhala, Khmer, Myanmar, Tai Tham, Cham, Thai or Lao text (C20, an/ActualTextspan per reordered run), every document with a shaped run or a line that changes font (C25, one text object per line — a tool that read the content stream as oneBT … ETper glyph now meetsTJarrays and relativeTdmoves inside one object;extractText()and every reader handle both), every Odia, Gurmukhi, Gujarati, Kannada or Malayalam line ending in a danda (C26) and every document registering a font it never draws (C18, far smaller); a downstream byte manifest is rebaselined once against 1.9.0. A wrapper that exposesextractText()returns logical-order text for those scripts now, tagged or not; Acrobat Reader pastes a tagged cell once.publish.yml,ci.ymlorsetup-verapdfcan take the guard → build → publish → attest pipeline, the Windows/macOS matrix and thehomeoutput of the action from this release.validatePdfX()reads inside XObjects: pdfnative-mcp'sPDF_X_CAVEATS("Not checked: colour inside Form XObjects and images") is stale against 1.9.0 and should drop that clause; the MCP playground quotes the server's text verbatim until the server changes it.pdfnative-build-emoji-font: a wrapper that runs--downloadin a pipeline must add--allow-unverifiedto keep running past an upstream font revision, or pin the font with--ttf..git-blame-ignore-revs; a fork or a long-lived branch sees a whole-tree carriage-return diff once (git merge -X ignore-space-at-eolresolves it) and should rungit config blame.ignoreRevsFile .git-blame-ignore-revs; the npm package is unaffected.Contributors
Issues #80–#92 were filed from agent-drafted reports reviewed by the maintainer; the HarfBuzz
hb-ot-shaper-indic.ccconfiguration rows and the Unicode BidiCharacterTest were the references for the Indic and BiDi work.Links
This discussion was created from the release v1.9.0 — conformance and fidelity: full UAX #9, 32 scripts, ToUnicode for every shaper, spot colours and the PDF/A + PDF/X dual claim, JPEG 2000, proven compatibility.
All reactions