Skip to content

[freetype] compiling with brotli support for woff2 and linking #12380

@kevinlul

Description

@kevinlul

Is your feature request related to a problem? Please describe.
With the freetype 2.10.2 update merged in #11846, support for WOFF 2 fonts was added but not accounted for when I updated the port. Thus, depending on whether brotli is already installed, it might be detected, support compiled, and linked in. The vcpkg brotli port does not export the library as BrotliDec like freetype expects, but as unofficial::brotli::brotli-SOMETHING, and I'm not sure why it's configured in this way.

Proposed solution
Add an optional feature brotli to control FT_WITH_BROTLI and CMAKE_DISABLE_FIND_PACKAGE_BrotliDec. Then either freetype must be patched to use the unofficial vcpkg CMake module names for brotli, or the unofficial CMake module names for brotli should be removed in favour of the official ones. I'm not sure why the unofficial names were added in the first place two years ago 33286f9.

Describe alternatives you've considered
Disable brotli support entirely like with HarfBuzz. Doesn't seem like a good idea to throw out an entire feature.

Additional context
I think #9838 might be related with the brotli CMake module names.

Metadata

Metadata

Assignees

Labels

category:port-bugThe issue is with a library, which is something the port should already support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions