Releases: cool-japan/oxifont
Releases · cool-japan/oxifont
OxiFont 0.1.2 Release
[0.1.2] - 2026-06-10
Added
oxifont-bundled:compressedfeature — build-time zlib compression viabuild.rs—build.rsnow reads every.ttffile fromfonts/, compresses them withoxiarc-deflate::zlib_compress(level 6), and writes<name>.ttf.zfiles to$OUT_DIR; when thecompressedfeature is enabled,BundledFontembeds the zlib bytes viainclude_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 indecompress_font; the function now directly callsoxiarc_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 — addedcompressed_testsmodule withcompressed_data_is_not_raw_sfntand round-trip validity tests; updatedsans_regular_ttf_magic,sans_bold_ttf_magic,serif_regular_ttf_magic, andall_fonts_have_valid_ttf_magicto usedecompressed_data()so they work under both compressed and non-compressed builds.
Changed
oxifont-bundleddecompressed_data_length_matches_raw_datatest updated to correctly assert that stored bytes are smaller than decompressed bytes under thecompressedfeature, and equal lengths without the feature.oxiarc-deflatebumped from0.3.2to0.3.3.oxiarc-brotlibumped from0.3.2to0.3.3.
Full Changelog: v0.1.1...v0.1.2
OxiFont 0.1.1 Release
[0.1.1] - 2026-06-04
Added
oxifont-adapter-native:shaper_bridgemodule — new cross-platform public module (pub mod shaper_bridge) providingcollect_fallback_fonts_for_text,collect_fonts_for_text,load_best_native_font_for_text,load_native_font_for_codepoint_with_index, andfind_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 codepointoxifont-adapter-native(macOS):load_fallback_font_bytes(codepoint)andload_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 callFontRef::from_indexdirectly without managing path-to-bytes conversionoxifont-adapter-pure:FontDatabase::font_bytes(&self, info)→Result<Vec<u8>, FontError>— exposes raw SFNT bytes for a catalogued face, serving as the integration point foroxifont-subset::subset_fontand WOFF2 encoding without requiring callers to importoxifont-subsetdirectlyoxifont-adapter-purefeaturedb:FontDatabase::into_db(self)andFontDatabase::as_db(&self)— convert the pure-Rust filesystem catalog to anoxifont_db::FontDatabase, enabling CSS Fonts Level 4 queries (oxifont_db::Query) on the result of a directory scanoxifont-adapter-purefeaturesubset:FontDatabase::subset_face(info, codepoints)andFontDatabase::subset_face_for_web(info, codepoints)— convenience wrappers that chainfont_bytes()withoxifont_subset::subset_font/subset_font_for_webin one call; the_for_webvariant strips hints and trims name records for smaller web font downloadsoxifont-parser:GlyphOutlineDatastruct andParsedFace::outline_with_bbox(gid)— returns path commands together with the font's own authoritative ink bounding box andhmtxadvance width/LSB, enabling rasterisation without fontdue or any third-party hinting libraryoxifont-parser:FontCapabilitiesimpl forParsedFace— implementsgsub_features(),gpos_features(),supported_scripts(),supported_languages(), andhas_feature([u8; 4]), giving shaping engines (oxitext-shape) GSUB/GPOS feature metadata without hand-parsing raw table bytesoxifont-db:FontDatabase::locale_families_for(bcp47)— returns locale-specific family names for the given BCP-47 tag; primary integration point foroxitext-iculocale-aware renderingoxifont-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 byoxitext-shapefor per-script font selectionoxifont-subset:pdf_subsetmodule — newPdfFontSubsetterbuilder for incremental PDF font subsetting; accumulates codepoints and raw GIDs across pages, produces subset SFNT bytes + CIDToGIDMap in a singlefinalize()calloxifont-webfont:build_sfnt_cowanddetect_sfnt_version_cow— zero-copy SFNT assembly variants that acceptCow<'_, [u8]>table slices; non-transformed tables borrow directly from the decompressed WOFF2 buffer, eliminating one copy per table in the hot WOFF2 decode pathoxifont-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, andoxifont-webfont
Changed
NativeError(oxifont-adapter-native) marked#[non_exhaustive]— downstream match expressions must include a catch-all arm; enables future variants without a semver breakFontError(oxifont-core) marked#[non_exhaustive]— same forward-compatibility guarantee for the shared error typeSfntError(oxifont-core) marked#[non_exhaustive]GlyphOutline(oxifont-core) coordinate-system documentation expanded with Y-axis convention, screen-space conversion pattern, and field mapping examplesoxifont-webfontWOFF2 decode path switched toextract_and_transform_tables_cow, reducing per-table allocations for non-transformed tablesoxicodeupdated from 0.2.3 to 0.2.4dashmapdependency removed from workspace
Full Changelog: v0.1.0...v0.1.1