Skip to content

capi: add HarfBuzz C++ ownership compatibility helpers - #514

Open
behdad wants to merge 3 commits into
capi/subset-plansfrom
capi/hb-cplusplus
Open

behdad wants to merge 3 commits into
capi/subset-plansfrom
capi/hb-cplusplus

Conversation

@behdad

@behdad behdad commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

C++ consumers using HarfBuzz's hb::shared_ptr and hb::unique_ptr currently have no replacement for hb-cplusplus.hh. Add hr-hb-cplusplus.hh, retaining the upstream ownership helpers, traits, hash specializations, and license notice.

Provide vtables for all eight supported core objects and for subset inputs/plans. Forwarding adapters preserve the HarfBuzz vtable function signatures while accommodating HarfRust's const user-data keys and mixed getter signatures. Omit unsupported Unicode callback, drawing, painting, and rendering objects. The generated subset header supplies its paired specialization block, allowing either include order and repeated includes. Subset objects use the existing harfrust_c library built with the optional subset feature; core-only tests link the default build.

Validation: 12 runtime builds pass with GCC and Clang, C++11 and C++17, using the core header alone and both subset include orders. Checks exercise real core/subset objects, shared copies, moves, unique release/swap, hashes, and exactly-once user-data destruction; subset plans execute successfully. C99 inclusion also passes. CI runs the six C++ standard/include-order variants on Linux and macOS.

Stacked on #513 because the subset vtables require its reference and user-data APIs. No further Skera functionality is needed for this header.

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