Skip to content

Releases: cool-japan/oxifont

OxiFont 0.1.2 Release

10 Jun 23:22

Choose a tag to compare

[0.1.2] - 2026-06-10

Added

  • oxifont-bundled: compressed feature — build-time zlib compression via build.rsbuild.rs now reads every .ttf file from fonts/, compresses them with oxiarc-deflate::zlib_compress (level 6), and writes <name>.ttf.z files to $OUT_DIR; when the compressed feature is enabled, BundledFont embeds the zlib bytes via include_bytes!(concat!(env!("OUT_DIR"), "...")) and decompresses on first parse, reducing embedded binary size.
  • oxifont-bundled: BundledFont::decompressed_data() works correctly with actual compressed data — removed the forward-compatibility SFNT-magic bypass in decompress_font; the function now directly calls oxiarc_deflate::zlib_decompress; the magic bypass was designed for a future build script that has now landed.
  • oxifont-webfont: WOFF2 glyf/loca passthrough support — enhanced glyf/loca table handling with improved passthrough logic for non-transformed tables, and improved reconstruction logic for transformed glyf tables.
  • oxifont-bundled: additional compressed feature tests — added compressed_tests module with compressed_data_is_not_raw_sfnt and round-trip validity tests; updated sans_regular_ttf_magic, sans_bold_ttf_magic, serif_regular_ttf_magic, and all_fonts_have_valid_ttf_magic to use decompressed_data() so they work under both compressed and non-compressed builds.

Changed

  • oxifont-bundled decompressed_data_length_matches_raw_data test updated to correctly assert that stored bytes are smaller than decompressed bytes under the compressed feature, and equal lengths without the feature.
  • oxiarc-deflate bumped from 0.3.2 to 0.3.3.
  • oxiarc-brotli bumped from 0.3.2 to 0.3.3.

Full Changelog: v0.1.1...v0.1.2

OxiFont 0.1.1 Release

04 Jun 12:10

Choose a tag to compare

[0.1.1] - 2026-06-04

Added

  • oxifont-adapter-native: shaper_bridge module — new cross-platform public module (pub mod shaper_bridge) providing collect_fallback_fonts_for_text, collect_fonts_for_text, load_best_native_font_for_text, load_native_font_for_codepoint_with_index, and find_native_font_for_codepoint; lets shaping engines (oxitext-shape, swash, rustybuzz) obtain raw font bytes for every missing codepoint in a single OS font enumeration pass, avoiding the N×M overhead of one query per codepoint
  • oxifont-adapter-native (macOS): load_fallback_font_bytes(codepoint) and load_fallback_font_bytes_with_index(codepoint) — return raw SFNT bytes (and TTC face index) for the first system font covering the given codepoint via CoreText; allows shaping engines to call FontRef::from_index directly without managing path-to-bytes conversion
  • oxifont-adapter-pure: FontDatabase::font_bytes(&self, info)Result<Vec<u8>, FontError> — exposes raw SFNT bytes for a catalogued face, serving as the integration point for oxifont-subset::subset_font and WOFF2 encoding without requiring callers to import oxifont-subset directly
  • oxifont-adapter-pure feature db: FontDatabase::into_db(self) and FontDatabase::as_db(&self) — convert the pure-Rust filesystem catalog to an oxifont_db::FontDatabase, enabling CSS Fonts Level 4 queries (oxifont_db::Query) on the result of a directory scan
  • oxifont-adapter-pure feature subset: FontDatabase::subset_face(info, codepoints) and FontDatabase::subset_face_for_web(info, codepoints) — convenience wrappers that chain font_bytes() with oxifont_subset::subset_font / subset_font_for_web in one call; the _for_web variant strips hints and trims name records for smaller web font downloads
  • oxifont-parser: GlyphOutlineData struct and ParsedFace::outline_with_bbox(gid) — returns path commands together with the font's own authoritative ink bounding box and hmtx advance width/LSB, enabling rasterisation without fontdue or any third-party hinting library
  • oxifont-parser: FontCapabilities impl for ParsedFace — implements gsub_features(), gpos_features(), supported_scripts(), supported_languages(), and has_feature([u8; 4]), giving shaping engines (oxitext-shape) GSUB/GPOS feature metadata without hand-parsing raw table bytes
  • oxifont-db: FontDatabase::locale_families_for(bcp47) — returns locale-specific family names for the given BCP-47 tag; primary integration point for oxitext-icu locale-aware rendering
  • oxifont-db: FontDatabase::faces_for_script(script_tag) — returns all faces covering the requested OpenType script tag (e.g. b"arab", b"deva", b"hani"); used by oxitext-shape for per-script font selection
  • oxifont-subset: pdf_subset module — new PdfFontSubsetter builder for incremental PDF font subsetting; accumulates codepoints and raw GIDs across pages, produces subset SFNT bytes + CIDToGIDMap in a single finalize() call
  • oxifont-webfont: build_sfnt_cow and detect_sfnt_version_cow — zero-copy SFNT assembly variants that accept Cow<'_, [u8]> table slices; non-transformed tables borrow directly from the decompressed WOFF2 buffer, eliminating one copy per table in the hot WOFF2 decode path
  • oxifont-adapter-native: DirectWrite integration test file with 8 platform-gated tests covering catalog enumeration, well-known Windows fonts, weight ranges, family names, path existence, and reload stability
  • Fuzz targets added for oxifont-db, oxifont-parser, oxifont-subset, and oxifont-webfont

Changed

  • NativeError (oxifont-adapter-native) marked #[non_exhaustive] — downstream match expressions must include a catch-all arm; enables future variants without a semver break
  • FontError (oxifont-core) marked #[non_exhaustive] — same forward-compatibility guarantee for the shared error type
  • SfntError (oxifont-core) marked #[non_exhaustive]
  • GlyphOutline (oxifont-core) coordinate-system documentation expanded with Y-axis convention, screen-space conversion pattern, and field mapping examples
  • oxifont-webfont WOFF2 decode path switched to extract_and_transform_tables_cow, reducing per-table allocations for non-transformed tables
  • oxicode updated from 0.2.3 to 0.2.4
  • dashmap dependency removed from workspace

Full Changelog: v0.1.0...v0.1.1

OxiFont 0.1.0 Release

01 Jun 13:07

Choose a tag to compare