fontations 0.1.2
fontations: ^0.1.2 copied to clipboard
Dart bindings for the Rust-based fontations font stack (read-fonts, skrifa, write-fonts) — read, shape and write OpenType fonts.
0.1.2 #
- 📝 Docs: improved the documentation.
0.1.1 #
- ✨ Example: light/dark themes derived from the Google Fonts logo palette with per-page accents; responsive glyph editor focus mode; short AppBar titles on narrow screens; horizontal shaping preview for wide runs; rebrand app as
fontationswith launcher icons. - 📱 Native: Android Gradle migrated to Kotlin DSL (AGP 9.3.1, Kotlin 2.4.0); macOS XCFramework built for arm64 only (drop x86_64) with CocoaPods integration removed; iOS XCFramework lists simulator slice first.
- 🤖 CI: GitHub Actions for CI, web preview and release builds; hardened Linux integration tests with Xvfb/software GL; cargo-fuzz and SwiftPM macOS test fixes.
- 🔧 Misc: Cargokit runs
pub getwithout--no-precompile; example dependency bumps.
0.1.0 #
📖 Read #
- 📐 Outlines & hinting through the
skrifa0.50 scaler. Hinting never silently changes linear bounds or advance;outlinereturns the scaler that ran,outlinesdraws a run through one scaler. - 📄 Any table: raw bytes plus a structured
GSUB/GPOSview.extendedTables()structuresSVG,gasp,meta,BASEand AAT and reports which optional tables are present. - 🎨 Color & bitmap:
COLR/CPALglyphs (with a Dartpainthelper) andsbix/CBDT/EBDTstrikes. Vertical metrics come fromvhea/vmtx/VORG. - ∑
MATH,VARCcomposites,cmapformat 14 variation selectors, andavar/avar2coordinate remapping.
🧩 Shape #
- 🪄
shape()appliesGSUBandGPOSinstead of only describing them: every substitution and positioning type, original and 2026 v2 subtables, with feature variations resolved at the current variation location. - 🐞 Shaping fixes: mark-filtering sets are honoured, ligatures no longer reach across ignored glyphs, cursive attachment writes its correction to
yOffset(notyAdvance), and mark lookups respect the lookup flags.
✍️ Write #
- 🏗
buildFontcompiles contours into a.ttf: variable fonts (fvar/gvar/STAT), ligatures,ss01/cv01alternates, composite glyphs,COLRv0,avar,MVAR,vhea/vmtx, TrueType hinting, verbatim tables andcmapformat 14. - 🔧
modifyFontpatches metadata, kerning, ligatures and substitutions while leaving outlines andcmapuntouched. - ✂️
subsetFontkeeps only chosen code points or glyphs;withVariations()returns a handle pinned to one variation location. - 🧩 Typed patch APIs for existing fonts:
addBitmapStrikes,addSubstitutions(with 2026 v2 output),addColorPaints,addFeatureVariations,addMathTable,addVarcGlyphs,addSvgDocuments,addVerticalOriginsandaddRawTables.
🌐 Web #
- ⚡ The crate compiles to WebAssembly and the API is unchanged. The threaded module needs cross-origin isolation (
COOP/COEP);example/web/coi_serviceworker.jsorscripts/coop_server.pyprovides it, and the app must be built with--no-web-resources-cdn.
📦 Packaging #
- 🍎 Added SwiftPM support for iOS and macOS: apps link a committed prebuilt
fontations.xcframeworkinstead of compiling Rust during the Xcode build. CocoaPods still compiles from source when SwiftPM is off.
🤖 CI & Dev #
- 🛠 CI runs six jobs —
rust,dart,web,fuzz,artifactsandmacos— and fails when the committed XCFramework no longer matchesrust/. - ⬆️ Upgraded to the fontations 2026-11-10 release (
read-fonts0.47,skrifa0.50,write-fonts0.56).
