Skip to content

C API: add OpenType CPAL palette queries - #523

Merged
behdad merged 4 commits into
capi/core-colorsfrom
capi/chromium-palettes
Oct 9, 2026
Merged

behdad merged 4 commits into
capi/core-colorsfrom
capi/chromium-palettes

Conversation

@behdad

@behdad behdad commented Oct 8, 2026

Copy link
Copy Markdown
Member

Chromium's CPAL lookup still depends on HarfBuzz even when HarfRust performs shaping. Add hr_ot_color_has_palettes, palette count/flags queries, and paginated unpremultiplied color retrieval, with HarfBuzz source-compatibility aliases and palette flag constants. Version 0 and 1 palettes and shared color records are supported through read-fonts; the API works for callback-created faces without enabling paint.

Stacked on #522 for the common color ABI. Part of #520.

Validation: 139 C API tests; 10,093 metadata comparisons against HarfBuzz 14.5.1 across 497 faces, including synthetic CPAL version 0/1 fixtures; Clippy 1.99; Rust 1.85 checking; GCC/Clang C99 linking and C++17 header checks.

@behdad
behdad requested a review from dfrg October 8, 2026 19:06
behdad added 2 commits October 9, 2026 13:19
* capi: expose AAT feature and selector metadata

* capi: preserve unsigned AAT constants in C++ templates

* ci: remove trailing workflow whitespace
C API: expose variation axes and localized UTF-16 names
@behdad
behdad merged commit faea219 into capi/core-colors Oct 9, 2026
3 checks passed
@behdad
behdad deleted the capi/chromium-palettes branch October 9, 2026 19:22
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.

2 participants