uharfbuzz icon indicating copy to clipboard operation
uharfbuzz copied to clipboard

Option to link against installed harfbuzz

Open simoncozens opened this issue 4 years ago • 1 comments

My harfbuzz is often not like your harfbuzz, so downloading and building a vendor harfbuzz isn't something I want uharfbuzz to do. Obviously it's a good idea for platforms where you can't be sure harfbuzz is installed already, but it's unnecessary in many cases when you can just link against the system version. Can we make that an option?

simoncozens avatar Jun 12 '20 21:06 simoncozens

yes, we should add an option. Given we should soon switch away from cmake build system (see #29) it should be done as part of that effort.

anthrotype avatar Jun 22 '20 12:06 anthrotype

@anthrotype has there been any update on this? it doesn't look like the meson build system was ever adopted.

we need to link against our system harfbuzz to avoid breaking abi compatibility.

BwL1289 avatar Aug 04 '24 18:08 BwL1289

We currently use some experimental HarfBuzz APIs that are unlikely to be enabled in system HarfBuzz (because they are not stable APIs and HarfBuzz build does not enable them by default), so even if other technical issues get addressed, it might still not be possible to link to system HarfBuzz for most users.

khaledhosny avatar Aug 04 '24 19:08 khaledhosny

@khaledhosny thanks for the response. That will break ABI compatibility with a number of other libraries for us unfortunately.

Can you specify which experimental harfbuzz APIs are enabled in the vendored version?

BwL1289 avatar Aug 04 '24 19:08 BwL1289

We use hb_subset_repack_or_fail().

khaledhosny avatar Aug 04 '24 23:08 khaledhosny

Thanks. We enable experimental APIs in our system harfbuzz so I might be able to fork as a last resort.

Would love to see an official option for this if possible.

BwL1289 avatar Aug 05 '24 00:08 BwL1289

PRs are always welcome.

khaledhosny avatar Aug 05 '24 06:08 khaledhosny

@khaledhosny PR incoming which allows linking against system harfbuzz. By design, installation will error out if harbuzz has not been built with experimental api support.

Supported documentation is included.

BwL1289 avatar Aug 20 '24 16:08 BwL1289

@khaledhosny our build is working on all platforms for CPython and fully working on windows but failing for PyPy on macos and ubuntu starting with PyPy 3.8.

Are you able to help with getting PyPy to work? We are not familiar with it.

BwL1289 avatar Aug 22 '24 16:08 BwL1289