All notable changes to @awacloud/oconv-fonts are documented here.
Format: Keep a Changelog · this project adheres to Semantic Versioning.
[Unreleased]
[1.0.0] - 2026-10-07
Added
- Package scaffold:
package.json(.js-suffixedexportssub-paths only,sideEffects: false, afilesallowlist), the office ESLint preset shim and this changelog. - Vendored Liberation Fonts 2.1.5 payload (12 TrueType faces —
LiberationSans/Serif/Mono × Regular/Bold/Italic/BoldItalic — 4 359 164 B),
vendor/OFL.txt,vendor/NOTICE-liberationandvendor/PROVENANCE.json(per-file sha256 pins). - The
oconvDefaultFacesfw descriptor:createOconvDefaultFaces(faces)(src/faces.js), the explicit async byte pathloadDefaultFaces(opts)andregisterDefaultFaces(runtime, opts)(src/loader.js), all re-exported bysrc/main.js.docs/descriptor.mdis the frozen contract: descriptor name, face-map shape and the per-class precedence `explicit opts.pdf.fonts[]default map[] > Standard 14
, the default map being a posteddefaultFacesmap when supplied, else the registeredoconvDefaultFaces` (four sources). The descriptor is main-thread-only (not serializable to a worker); the face bytes structured-clone. docs/README.mdand a fulldocs/api/mirror —README.mdplus one page per public member (create-oconv-default-faces.md,load-default-faces.md,register-default-faces.md). Each page restates and linksdocs/descriptor.md's frozen contract rather than re-deriving the per-style-class precedence rule. The OFL Reserved Font Name / "never pre-subset" clause is stated inREADME.mdanddocs/api/README.md.awa.maturityraised toL3, withawa.coverageBasis: ["src/**"]and a measuredawa.coverageFloor: 0.98(the basis mean was 100.00 % over its 3 rows; the manifest's_coverageCommentcarries the command and the figure).- Manifest additions for the L3 file checklist:
filesgainsLICENSE,NOTICEanddocs(an allowlist that omitsNOTICEsilently drops the OFL attribution from the tarball); extended fieldsdescription,keywords,engines,repository,homepage,bugs,author,companyandcopyright.
Changed
docs/descriptor.md§ "Precedence rule" now names the fourth source theoconvPDF writer already applies: adefaultFacesmap posted with afromMdorconvertrequest (how a worker receives the host's faces) takes the default-map slot and wins whole over the registeredoconvDefaultFaces— it is not merged with it class by class. The README, the guides index and thedocs/api/pages restate the four-source form.- Documentation pass: the README follows the published-package skeleton
(installation, Quick Start with an executed snippet, an exposed sub-paths
table with one row per
exportskey, maturity, licence and project links), the reference pages and source comments no longer cite files outside the package, anddocs/descriptor.mdnow states howhas()andresolve()behave on a runtime built from@awacloud/oconv(the always-registered name-only stand-in means a bareresolveofoconvDefaultFacesdoes not throw there). The throwaway measurement scripts behind the coverage and payload figures no longer sit in the package directory; they were never part of the tarball.
Tests
- An integration test runs the real
npm pack --dry-run --json --ignore-scriptsand asserts the tarball selector carriesNOTICE,LICENSE,README.md,CHANGELOG.md, all 12 vendored.ttfpaths,vendor/OFL.txt,vendor/NOTICE-liberationandvendor/PROVENANCE.json, and no*.test.jspath. - A second
registerDefaultFaces(runtime)call is pinned on a realModuleRuntime: re-registration re-points the descriptor, an already-resolved instance stays cached untilinvalidate. The README section "Registering twice" states the host rule.
Fixed
- The default faces now load under Node.js. Node's
fetchrefusesfile:URLs, soloadDefaultFaces()andregisterDefaultFaces()rejected withoconv-fonts: cannot load file:///… (fetch failed)there. When thefetchpath fails for afile:URL, the loader now reads the face throughnode:fs/promises, imported dynamically on that path only (no import-time side effect; browsers, which usehttp(s):URLs, never load it). A failed or empty read keeps the sameoconv-fonts: cannot load <url> (...)error. An integration test runs the loader in a real Node.js subprocess. - Documentation links resolve from the npm tarball. Links that pointed outside the package now point at the public repository at this release's tag, so they resolve from the tarball.