Subject: Re: bug#73730: 31.0.50; Support for color fonts on MS-Windows

From: Cecilio Pardo <[email-masked]>
Date: Tue, 29 Oct 2024 09:57:11 +0100

I've built HarfBuzz with the attached patch with mingw, using

g++ src/harfbuzz.cc --shared -o libharfbuzz-0.dll --no-exceptions

and it seems to work fine.

From a5902ab42ae6dcfa8cded0b0e731691e4d8f7105 Mon Sep 17 00:00:00 2001
From: Cecilio Pardo <[email-masked]>
Date: Tue, 29 Oct 2024 09:21:14 +0100
Subject: [PATCH] ..

---
 src/harfbuzz.cc | 4 ++++
 src/hb.hh       | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/harfbuzz.cc b/src/harfbuzz.cc
index 9ff800daa..486e44bf3 100644
--- a/src/harfbuzz.cc
+++ b/src/harfbuzz.cc
@@ -1,3 +1,6 @@
+#define WINAPI_PARTITION_DESKTOP 1
+#define WINAPI_FAMILY_PARTITION(x) (x)
+
 #include "OT/Var/VARC/VARC.cc"
 #include "hb-aat-layout.cc"
 #include "hb-aat-map.cc"
@@ -62,3 +65,4 @@
 #include "hb-uniscribe.cc"
 #include "hb-wasm-api.cc"
 #include "hb-wasm-shape.cc"
+
diff --git a/src/hb.hh b/src/hb.hh
index fe466fe1f..9c54bc3bd 100644
--- a/src/hb.hh
+++ b/src/hb.hh
@@ -216,7 +216,7 @@
 
 #ifdef _WIN32
 #include <windows.h>
-#include <winapifamily.h>
+// #include <winapifamily.h>
 #endif
 
 #ifndef PRId32
-- 
2.35.1.windows.2