Skip to content

subset capi: expose configurable input sets, flags, and preprocessing - #512

Open
behdad wants to merge 5 commits into
capi/skia-subsetfrom
capi/subset-input-controls
Open

behdad wants to merge 5 commits into
capi/skia-subsetfrom
capi/subset-input-controls

Conversation

@behdad

@behdad behdad commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Extend the subset C API beyond Skia's initial glyph workflow with hr_subset_input_set, hr_subset_input_keep_everything, and hr_subset_preprocess, plus HarfBuzz aliases. Expose configurable names/languages, layout features/scripts, and dropped-table sets, along with the implemented Skera flags for legacy names, overlap bits, unknown-table passthrough, glyph names, Unicode ranges, layout closure, and bidi closure.

These APIs are part of the optional subset feature of harfrust_capi; enable it with cargo build -p harfrust_capi --features subset and link the single harfrust_c library. Headers, examples, and tests live under harfrust_capi.

Preserve inverted input tag sets when building Skera plans. Skera uses that representation to select existing script records efficiently; materializing all possible tags would make it enumerate billions of values. Preprocessing returns an immutable standalone face owning copied tables, without promising an acceleration cache.

Published Skera fixes its no-subset-table set internally, so modifying that set currently returns failure rather than ignoring the request. A small upstream Plan API extension is being prepared for customization and glyph mappings. Axis instancing, CFF/CFF2/VARC, and unimplemented dependency flags remain unavailable.

Validation: the original 48 differential cases and 15 additional HarfBuzz comparisons pass, including input-set defaults, keep-everything, name/layout/drop controls, all added flags, unknown tables, overlap bits, and preprocessing ownership. Rust 1.85 checking, rustfmt, and Clippy pass. The CI C smoke test now also exercises preprocessing, inverted selections, and subsequent customization.

Stacked on #511; extends #507.

behdad added 2 commits October 7, 2026 16:21
Add configurable name/layout/drop sets, keep-everything, and supported Skera flags. Preserve inverted tag sets and return an owned immutable preprocessing face.

Assisted-by: OpenAI Codex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant