diff --git a/pkgs/c/compat.harfbuzz.lua b/pkgs/c/compat.harfbuzz.lua index 32c4e847..41df390f 100644 --- a/pkgs/c/compat.harfbuzz.lua +++ b/pkgs/c/compat.harfbuzz.lua @@ -41,6 +41,9 @@ package = { CN = "https://gitcode.com/mcpp-res/harfbuzz/releases/download/14.3.0/harfbuzz-14.3.0.tar.gz", }, sha256 = "566e996a1b40486954fb7110ffe6eb88a0f7958bb466cdb023b0302618acea4a", + -- 1: hb-ft with FreeType's variation and transform entry points + -- (the HAVE_FT_* cxxflags below): installed copies take them. + revision = 1, }, }, macosx = { @@ -50,6 +53,9 @@ package = { CN = "https://gitcode.com/mcpp-res/harfbuzz/releases/download/14.3.0/harfbuzz-14.3.0.tar.gz", }, sha256 = "566e996a1b40486954fb7110ffe6eb88a0f7958bb466cdb023b0302618acea4a", + -- 1: hb-ft with FreeType's variation and transform entry points + -- (the HAVE_FT_* cxxflags below): installed copies take them. + revision = 1, }, }, windows = { @@ -59,6 +65,9 @@ package = { CN = "https://gitcode.com/mcpp-res/harfbuzz/releases/download/14.3.0/harfbuzz-14.3.0.tar.gz", }, sha256 = "566e996a1b40486954fb7110ffe6eb88a0f7958bb466cdb023b0302618acea4a", + -- 1: hb-ft with FreeType's variation and transform entry points + -- (the HAVE_FT_* cxxflags below): installed copies take them. + revision = 1, }, }, }, @@ -72,7 +81,20 @@ package = { -- what makes more than a set of declarations. The public -- header is installed either way, so without this the consumer gets a -- link error rather than a compile error -- worth pinning down here. - cxxflags = { "-DHAVE_FREETYPE=1" }, + -- + -- The four HAVE_FT_* are what upstream's meson.build sets for every + -- FreeType that has these entry points (check_freetype_funcs; all of + -- them since FreeType 2.11, so compat.freetype 2.13.3 too). Without + -- them hb-ft.cc compiles out its variation and transform support: the + -- FreeType font functions ignore hb_font_set_variations() and the + -- face's FT_Set_Transform, and upstream's shaping suites fail with + -- --font-funcs=ft on every variable font (TestGVAR*, TestHVAR*, + -- TestCVARGVAR*, HBTest-VF …). + cxxflags = { "-DHAVE_FREETYPE=1", + "-DHAVE_FT_GET_VAR_BLEND_COORDINATES=1", + "-DHAVE_FT_SET_VAR_BLEND_COORDINATES=1", + "-DHAVE_FT_DONE_MM_VAR=1", + "-DHAVE_FT_GET_TRANSFORM=1" }, targets = { ["harfbuzz"] = { kind = "lib" } }, deps = { ["compat.freetype"] = "2.13.3" }, linux = {