Repository navigation
C API: add optional Skrifa draw and paint features - #519
Merged
Merged
Conversation
Support Skia face setup and callback-backed table enumeration. Keep collection selection separate from mutable face index metadata. Assisted-by: OpenAI Codex
Map strided batches in public queries and shaping, with scalar/batch fallback and callback precedence through subfonts. Assisted-by: OpenAI Codex
Keep the package version unchanged while making hb_version and HB_VERSION aliases report the matched shaping release. Add hr-hb-ot.h and generate portable include guards. Assisted-by: OpenAI Codex
Provide Skia glyph/Unicode selection, retained IDs, notdef outlines, and hint removal through hr_subset APIs and hr-hb-subset.h. Import the core C ABI instead of embedding a second shaping library. Assisted-by: OpenAI Codex
…bset # Conflicts: # harfrust_capi/README.md
This was referenced Oct 8, 2026
This was referenced Oct 16, 2026
dfrg
approved these changes
Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add optional
drawandpaintfeatures backed by published Skrifa, using the existing face/font handles and C library.paintenablesdraw; both remain off by default.Drawing supports unhinted glyf, CFF/CFF2 and VARC outlines at the font's variation coordinates and X/Y scales. Painting supports COLRv0/v1 palettes, gradients, transforms, clips, composites, cached glyph callbacks, SVG, and CBDT/sbix images. Custom font callbacks and parent-font inheritance work with both features. Failed paint traversal unwinds outstanding scopes, and clients can retain image blobs beyond a callback.
Native
hr-draw.h/hr-paint.hheaders and HarfBuzz compatibility headers expose the APIs. Callback faces use a cached rendering SFNT without requiring table enumeration. The painting adapter follows HarfBuzz's Rust font adapter and preserves its license. Packed color definitions stay in the core API, and the core header is unchanged.Validation after merging current main and the released C API stack:
Documented limits remain: hinting, bitmap masks, shape convenience functions, configurable budgets, and gradient preprocessing/tiling helpers are not mapped. Skrifa's traversal limits apply. VARC transform precision and bitmap extent rounding may differ slightly from native HarfBuzz; rendering tables are copied once per face.
Stacked on #546 using published dependencies. Merge order: #544 → #545 → #546 → #519 → #547. Only the final draft #547 waits for a Skera release.