SDL_ttf: upgrade vendored harfbuzz to 8.5.0,

From 2eb89384280243659c8bc09322d2e0040eebee86 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 20 Mar 2025 03:01:20 +0300
Subject: [PATCH] upgrade vendored harfbuzz to 8.5.0,

- fix cmake setup so that the optional freetype symbols
  can actually be used in our vendored harfbuzz,
- support Windows- and Apple-specific harfbuzz backends,
- minor update to vendored freetype along the way.

Reference issue: https://github.com/libsdl-org/SDL_ttf/issues/532
---
 .gitmodules                             |   2 +-
 CMakeLists.txt                          |  41 ++-
 VisualC/SDL_ttf.vcxproj                 |  24 +-
 Xcode/SDL_ttf.xcodeproj/project.pbxproj | 342 ++----------------------
 configure                               |  29 +-
 configure.ac                            |  13 +-
 external/freetype                       |   2 +-
 external/harfbuzz                       |   2 +-
 8 files changed, 105 insertions(+), 350 deletions(-)

diff --git a/.gitmodules b/.gitmodules
index 49593939..bc38605c 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -5,4 +5,4 @@
 [submodule "external/harfbuzz"]
 	path = external/harfbuzz
 	url = https://github.com/libsdl-org/harfbuzz.git
-	branch = 8.1.1-SDL
+	branch = 8.5.0-SDL
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e95413b..8fa4f0a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -182,23 +182,61 @@ set(PC_REQUIRES)
 set(BUILD_SHARED_LIBS OFF)
 
 if(SDL2TTF_HARFBUZZ)
+    set(harfbuzz_link_libraries)
     if(SDL2TTF_HARFBUZZ_VENDORED)
         message(STATUS "${PROJECT_NAME}: Using vendored harfbuzz library")
+        # HB_BUILD_SUBSET variable is used by harfbuzz
+        set(HB_BUILD_SUBSET OFF CACHE BOOL "build harfbuzz-subset" FORCE)
         # HB_BUILD_UTILS variable is used by harfbuzz
         set(HB_BUILD_UTILS OFF CACHE BOOL "harfbuzz build utils" FORCE)
         # SKIP_INSTALL_LIBRARIES variable is used by harfbuzz
         set(SKIP_INSTALL_LIBRARIES ON CACHE BOOL "harfbuzz install option" FORCE)
         # HB_HAVE_FREETYPE variable is used by harfbuzz
         set(HB_HAVE_FREETYPE ${SDL2TTF_FREETYPE} CACHE BOOL "harfbuzz freetype helpers" FORCE)
+        # target-specific harfbuzz backends :
+        if(APPLE)
+            # Minimum version for $<LINK_LIBRARY:feature,library-list>
+            cmake_minimum_required(VERSION 3.24)
+            # HB_HAVE_CORETEXT variable is used by harfbuzz
+            set(HB_HAVE_CORETEXT ON CACHE BOOL "harfbuzz coretext backend" FORCE)
+        endif()
+        if(WIN32)
+            # HB_HAVE_UNISCRIBE variable is used by harfbuzz
+            set(HB_HAVE_UNISCRIBE ON CACHE BOOL "harfbuzz uniscribe backend" FORCE)
+            # HB_HAVE_GDI variable is used by harfbuzz
+            set(HB_HAVE_GDI ON CACHE BOOL "harfbuzz windows backend" FORCE)
+        endif()
+        ## HACK: HACK: These fail detection, we rely on our own vendored FreeType having them ##
+        set(HAVE_FT_GET_VAR_BLEND_COORDINATES 1 CACHE BOOL "FT_Get_Var_Blend_Coordinates" FORCE)
+        set(HAVE_FT_SET_VAR_BLEND_COORDINATES 1 CACHE BOOL "FT_Set_Var_Blend_Coordinates" FORCE)
+        set(HAVE_FT_DONE_MM_VAR 1 CACHE BOOL "FT_Done_MM_Var" FORCE)
+        set(HAVE_FT_GET_TRANSFORM 1 CACHE BOOL "FT_Get_Transform" FORCE)
         if(NOT EXISTS "${PROJECT_SOURCE_DIR}/external/harfbuzz/CMakeLists.txt")
             message(FATAL_ERROR "No harfbuzz sources found. Install a harfbuzz development package or run the download script in the external folder.")
         endif()
         add_subdirectory(external/harfbuzz EXCLUDE_FROM_ALL)
         # harfbuzz is a c++ project, enable c++ here to ensure linking to the c++ standard library
         enable_language(CXX)
+        set(harfbuzz_link_libraries harfbuzz::harfbuzz)
         if(NOT SDL2TTF_BUILD_SHARED_LIBS)
             list(APPEND INSTALL_EXTRA_TARGETS harfbuzz)
             list(APPEND PC_LIBS -l$<TARGET_FILE_BASE_NAME:harfbuzz>)
+            if(WIN32)
+                # for uniscribe and gdi backends :
+                list(APPEND harfbuzz_link_libraries usp10 gdi32 rpcrt4)
+                list(APPEND PC_LIBS -lusp10 -lgdi32 -lrpcrt4)
+            elseif(APPLE)
+                # for coretext backend :
+                list(APPEND harfbuzz_link_libraries "$<LINK_LIBRARY:FRAMEWORK,CoreText>")
+                list(APPEND harfbuzz_link_libraries "$<LINK_LIBRARY:FRAMEWORK,CoreGraphics>")
+                list(APPEND harfbuzz_link_libraries "$<LINK_LIBRARY:FRAMEWORK,CoreFoundation>")
+                list(APPEND PC_LIBS "-Wl,-framework,CoreText")
+                list(APPEND PC_LIBS "-Wl,-framework,CoreGraphics")
+                list(APPEND PC_LIBS "-Wl,-framework,CoreFoundation")
+            else()
+                find_package(Threads)
+                set(harfbuzz_link_libraries Threads::Threads)
+            endif()
         endif()
         if(NOT TARGET harfbuzz::harfbuzz)
             add_library(harfbuzz::harfbuzz ALIAS harfbuzz)
@@ -207,9 +245,10 @@ if(SDL2TTF_HARFBUZZ)
         message(STATUS "${PROJECT_NAME}: Using system harfbuzz library")
         find_package(harfbuzz "${HARFBUZZ_REQUIRED_VERSION}" REQUIRED)
         list(APPEND PC_REQUIRES harfbuzz)
+        set(harfbuzz_link_libraries harfbuzz::harfbuzz)
     endif()
     target_compile_definitions(SDL2_ttf PRIVATE TTF_USE_HARFBUZZ=1)
-    target_link_libraries(SDL2_ttf PRIVATE harfbuzz::harfbuzz)
+    target_link_libraries(SDL2_ttf PRIVATE ${harfbuzz_link_libraries} )
 endif()
 
 if(SDL2TTF_FREETYPE)
diff --git a/VisualC/SDL_ttf.vcxproj b/VisualC/SDL_ttf.vcxproj
index 37888a23..3ba39db4 100644
--- a/VisualC/SDL_ttf.vcxproj
+++ b/VisualC/SDL_ttf.vcxproj
@@ -85,19 +85,19 @@
     <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <IncludePath>..\external\freetype\include;..\external\harfbuzz\src;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
+    <IncludePath>..\external\freetype\include;..\external\harfbuzz;..\external\harfbuzz\src;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
     <LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <IncludePath>..\external\freetype\include;..\external\harfbuzz\src;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
+    <IncludePath>..\external\freetype\include;..\external\harfbuzz;..\external\harfbuzz\src;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
     <LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <IncludePath>..\external\freetype\include;..\external\harfbuzz\src;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
+    <IncludePath>..\external\freetype\include;..\external\harfbuzz;..\external\harfbuzz\src;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
     <LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <IncludePath>..\external\freetype\include;..\external\harfbuzz\src;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
+    <IncludePath>..\external\freetype\include;..\external\harfbuzz;..\external\harfbuzz\src;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
     <LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -112,7 +112,7 @@
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;TTF_USE_HARFBUZZ=1;FT_PUBLIC_FUNCTION_ATTRIBUTE=;FT_CONFIG_OPTION_USE_HARFBUZZ;FT2_BUILD_LIBRARY;HAVE_FREETYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;TTF_USE_HARFBUZZ=1;HAVE_CONFIG_H;FT_PUBLIC_FUNCTION_ATTRIBUTE=;FT_CONFIG_OPTION_USE_HARFBUZZ;FT2_BUILD_LIBRARY;HAVE_FREETYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>OldStyle</DebugInformationFormat>
@@ -122,7 +122,7 @@
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>usp10.lib;gdi32.lib;rpcrt4.lib;SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>external\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
@@ -140,7 +140,7 @@
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;TTF_USE_HARFBUZZ=1;FT_PUBLIC_FUNCTION_ATTRIBUTE=;FT_CONFIG_OPTION_USE_HARFBUZZ;FT2_BUILD_LIBRARY;HAVE_FREETYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>DLL_EXPORT;WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;TTF_USE_HARFBUZZ=1;HAVE_CONFIG_H;FT_PUBLIC_FUNCTION_ATTRIBUTE=;FT_CONFIG_OPTION_USE_HARFBUZZ;FT2_BUILD_LIBRARY;HAVE_FREETYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
       <DebugInformationFormat>OldStyle</DebugInformationFormat>
@@ -149,7 +149,7 @@
       <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ResourceCompile>
     <Link>
-      <AdditionalDependencies>SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>usp10.lib;gdi32.lib;rpcrt4.lib;SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>external\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Windows</SubSystem>
@@ -166,7 +166,7 @@
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <PreprocessorDefinitions>DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;TTF_USE_HARFBUZZ=1;FT_PUBLIC_FUNCTION_ATTRIBUTE=;FT_CONFIG_OPTION_USE_HARFBUZZ;FT2_BUILD_LIBRARY;HAVE_FREETYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;TTF_USE_HARFBUZZ=1;HAVE_CONFIG_H;FT_PUBLIC_FUNCTION_ATTRIBUTE=;FT_CONFIG_OPTION_USE_HARFBUZZ;FT2_BUILD_LIBRARY;HAVE_FREETYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
       <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
@@ -176,7 +176,7 @@
     </ResourceCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
-      <AdditionalDependencies>SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>usp10.lib;gdi32.lib;rpcrt4.lib;SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>external\lib\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
@@ -193,7 +193,7 @@
       </HeaderFileName>
     </Midl>
     <ClCompile>
-      <PreprocessorDefinitions>DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;TTF_USE_HARFBUZZ=1;FT_PUBLIC_FUNCTION_ATTRIBUTE=;FT_CONFIG_OPTION_USE_HARFBUZZ;FT2_BUILD_LIBRARY;HAVE_FREETYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>DLL_EXPORT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;TTF_USE_HARFBUZZ=1;HAVE_CONFIG_H;FT_PUBLIC_FUNCTION_ATTRIBUTE=;FT_CONFIG_OPTION_USE_HARFBUZZ;FT2_BUILD_LIBRARY;HAVE_FREETYPE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
     </ClCompile>
@@ -202,7 +202,7 @@
     </ResourceCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
-      <AdditionalDependencies>SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies>usp10.lib;gdi32.lib;rpcrt4.lib;SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <AdditionalLibraryDirectories>external\lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
diff --git a/Xcode/SDL_ttf.xcodeproj/project.pbxproj b/Xcode/SDL_ttf.xcodeproj/project.pbxproj
index 7aa84e3a..9c875124 100644
--- a/Xcode/SDL_ttf.xcodeproj/project.pbxproj
+++ b/Xcode/SDL_ttf.xcodeproj/project.pbxproj
@@ -7,52 +7,6 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		618704E72B476A1500575B78 /* hb-outline.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704E62B476A1500575B78 /* hb-outline.cc */; };
-		618704E82B476A1500575B78 /* hb-outline.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704E62B476A1500575B78 /* hb-outline.cc */; };
-		618704EA2B476A5200575B78 /* hb-paint-extents.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704E92B476A5200575B78 /* hb-paint-extents.cc */; };
-		618704EB2B476A5200575B78 /* hb-paint-extents.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704E92B476A5200575B78 /* hb-paint-extents.cc */; };
-		618704ED2B476A9900575B78 /* hb-buffer-verify.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704EC2B476A9900575B78 /* hb-buffer-verify.cc */; };
-		618704EE2B476A9900575B78 /* hb-buffer-verify.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704EC2B476A9900575B78 /* hb-buffer-verify.cc */; };
-		618704F02B476B1900575B78 /* hb-ot-shaper-arabic.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704EF2B476B1900575B78 /* hb-ot-shaper-arabic.cc */; };
-		618704F12B476B1900575B78 /* hb-ot-shaper-arabic.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704EF2B476B1900575B78 /* hb-ot-shaper-arabic.cc */; };
-		618704F32B476B5800575B78 /* hb-ot-shaper-default.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F22B476B5800575B78 /* hb-ot-shaper-default.cc */; };
-		618704F42B476B5800575B78 /* hb-ot-shaper-default.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F22B476B5800575B78 /* hb-ot-shaper-default.cc */; };
-		618704FB2B476BAD00575B78 /* hb-ot-shaper-thai.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F52B476BAD00575B78 /* hb-ot-shaper-thai.cc */; };
-		618704FC2B476BAD00575B78 /* hb-ot-shaper-thai.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F52B476BAD00575B78 /* hb-ot-shaper-thai.cc */; };
-		618704FD2B476BAD00575B78 /* hb-ot-shaper-khmer.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F62B476BAD00575B78 /* hb-ot-shaper-khmer.cc */; };
-		618704FE2B476BAD00575B78 /* hb-ot-shaper-khmer.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F62B476BAD00575B78 /* hb-ot-shaper-khmer.cc */; };
-		618704FF2B476BAD00575B78 /* hb-ot-shaper-indic.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F72B476BAD00575B78 /* hb-ot-shaper-indic.cc */; };
-		618705002B476BAD00575B78 /* hb-ot-shaper-indic.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F72B476BAD00575B78 /* hb-ot-shaper-indic.cc */; };
-		618705012B476BAD00575B78 /* hb-ot-shaper-hebrew.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F82B476BAD00575B78 /* hb-ot-shaper-hebrew.cc */; };
-		618705022B476BAD00575B78 /* hb-ot-shaper-hebrew.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F82B476BAD00575B78 /* hb-ot-shaper-hebrew.cc */; };
-		618705032B476BAD00575B78 /* hb-ot-shaper-hangul.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F92B476BAD00575B78 /* hb-ot-shaper-hangul.cc */; };
-		618705042B476BAD00575B78 /* hb-ot-shaper-hangul.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704F92B476BAD00575B78 /* hb-ot-shaper-hangul.cc */; };
-		618705052B476BAD00575B78 /* hb-ot-shaper-use.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704FA2B476BAD00575B78 /* hb-ot-shaper-use.cc */; };
-		618705062B476BAD00575B78 /* hb-ot-shaper-use.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618704FA2B476BAD00575B78 /* hb-ot-shaper-use.cc */; };
-		6187050B2B476C1900575B78 /* hb-ot-shaper-myanmar.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705072B476C1800575B78 /* hb-ot-shaper-myanmar.cc */; };
-		6187050C2B476C1900575B78 /* hb-ot-shaper-myanmar.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705072B476C1800575B78 /* hb-ot-shaper-myanmar.cc */; };
-		6187050D2B476C1900575B78 /* hb-ot-shaper-syllabic.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705082B476C1800575B78 /* hb-ot-shaper-syllabic.cc */; };
-		6187050E2B476C1900575B78 /* hb-ot-shaper-syllabic.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705082B476C1800575B78 /* hb-ot-shaper-syllabic.cc */; };
-		6187050F2B476C1900575B78 /* hb-ot-shaper-indic-table.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705092B476C1900575B78 /* hb-ot-shaper-indic-table.cc */; };
-		618705102B476C1900575B78 /* hb-ot-shaper-indic-table.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705092B476C1900575B78 /* hb-ot-shaper-indic-table.cc */; };
-		618705112B476C1900575B78 /* hb-ot-shaper-vowel-constraints.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6187050A2B476C1900575B78 /* hb-ot-shaper-vowel-constraints.cc */; };
-		618705122B476C1900575B78 /* hb-ot-shaper-vowel-constraints.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6187050A2B476C1900575B78 /* hb-ot-shaper-vowel-constraints.cc */; };
-		618705162B476C8900575B78 /* hb-draw.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705132B476C8800575B78 /* hb-draw.cc */; };
-		618705172B476C8900575B78 /* hb-draw.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705132B476C8800575B78 /* hb-draw.cc */; };
-		618705182B476C8900575B78 /* hb-coretext.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705142B476C8900575B78 /* hb-coretext.cc */; };
-		618705192B476C8900575B78 /* hb-coretext.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705142B476C8900575B78 /* hb-coretext.cc */; };
-		6187051A2B476C8900575B78 /* hb-directwrite.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705152B476C8900575B78 /* hb-directwrite.cc */; };
-		6187051B2B476C8900575B78 /* hb-directwrite.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705152B476C8900575B78 /* hb-directwrite.cc */; };
-		6187051F2B476CF000575B78 /* hb-ot-meta.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6187051C2B476CF000575B78 /* hb-ot-meta.cc */; };
-		618705202B476CF000575B78 /* hb-ot-meta.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6187051C2B476CF000575B78 /* hb-ot-meta.cc */; };
-		618705212B476CF000575B78 /* hb-ot-name.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6187051D2B476CF000575B78 /* hb-ot-name.cc */; };
-		618705222B476CF000575B78 /* hb-ot-name.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6187051D2B476CF000575B78 /* hb-ot-name.cc */; };
-		618705232B476CF000575B78 /* hb-ot-color.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6187051E2B476CF000575B78 /* hb-ot-color.cc */; };
-		618705242B476CF000575B78 /* hb-ot-color.cc in Sources */ = {isa = PBXBuildFile; fileRef = 6187051E2B476CF000575B78 /* hb-ot-color.cc */; };
-		618705272B476D2A00575B78 /* hb-paint.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705252B476D2A00575B78 /* hb-paint.cc */; };
-		618705282B476D2A00575B78 /* hb-paint.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705252B476D2A00575B78 /* hb-paint.cc */; };
-		618705292B476D2A00575B78 /* hb-cairo.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705262B476D2A00575B78 /* hb-cairo.cc */; };
-		6187052A2B476D2A00575B78 /* hb-cairo.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618705262B476D2A00575B78 /* hb-cairo.cc */; };
 		7FC2F5DC285AC0D600836845 /* CMake in Resources */ = {isa = PBXBuildFile; fileRef = 7FC2F5DB285AC0D600836845 /* CMake */; };
 		BE48FD5F07AFA17000BB41DA /* SDL_ttf.h in Headers */ = {isa = PBXBuildFile; fileRef = 1014BAEA010A4B677F000001 /* SDL_ttf.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		BE48FD6207AFA17000BB41DA /* SDL_ttf.c in Sources */ = {isa = PBXBuildFile; fileRef = F567D67A01CD962A01F3E8B9 /* SDL_ttf.c */; };
@@ -144,70 +98,13 @@
 		F384BCE2261EC2CF0028A248 /* winfnt.c in Sources */ = {isa = PBXBuildFile; fileRef = F384BCDE261EC2CF0028A248 /* winfnt.c */; };
 		F384BCF2261EC5130028A248 /* ftcache.c in Sources */ = {isa = PBXBuildFile; fileRef = F384BCF1261EC5130028A248 /* ftcache.c */; };
 		F384BCF5261EC5130028A248 /* ftcache.c in Sources */ = {isa = PBXBuildFile; fileRef = F384BCF1261EC5130028A248 /* ftcache.c */; };
-		F384BD35261EC7650028A248 /* hb-set.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD06261EC7640028A248 /* hb-set.cc */; };
-		F384BD38261EC7650028A248 /* hb-set.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD06261EC7640028A248 /* hb-set.cc */; };
-		F384BD3B261EC7650028A248 /* hb-shape.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD07261EC7640028A248 /* hb-shape.cc */; };
-		F384BD3E261EC7650028A248 /* hb-shape.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD07261EC7640028A248 /* hb-shape.cc */; };
-		F384BD41261EC7650028A248 /* hb-static.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD08261EC7640028A248 /* hb-static.cc */; };
-		F384BD44261EC7650028A248 /* hb-static.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD08261EC7640028A248 /* hb-static.cc */; };
-		F384BD4D261EC7650028A248 /* hb-ucd.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD0A261EC7640028A248 /* hb-ucd.cc */; };
-		F384BD50261EC7650028A248 /* hb-ucd.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD0A261EC7640028A248 /* hb-ucd.cc */; };
-		F384BD59261EC7650028A248 /* hb-ot-map.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD0C261EC7640028A248 /* hb-ot-map.cc */; };
-		F384BD5C261EC7650028A248 /* hb-ot-map.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD0C261EC7640028A248 /* hb-ot-map.cc */; };
-		F384BD65261EC7650028A248 /* hb-ot-font.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD0E261EC7640028A248 /* hb-ot-font.cc */; };
-		F384BD68261EC7650028A248 /* hb-ot-font.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD0E261EC7640028A248 /* hb-ot-font.cc */; };
-		F384BD6B261EC7650028A248 /* hb-shape-plan.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD0F261EC7640028A248 /* hb-shape-plan.cc */; };
-		F384BD6E261EC7650028A248 /* hb-shape-plan.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD0F261EC7640028A248 /* hb-shape-plan.cc */; };
-		F384BD71261EC7650028A248 /* hb-ot-tag.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD10261EC7640028A248 /* hb-ot-tag.cc */; };
-		F384BD74261EC7650028A248 /* hb-ot-tag.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD10261EC7640028A248 /* hb-ot-tag.cc */; };
-		F384BD77261EC7650028A248 /* hb-number.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD11261EC7640028A248 /* hb-number.cc */; };
-		F384BD7A261EC7650028A248 /* hb-number.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD11261EC7640028A248 /* hb-number.cc */; };
-		F384BD7D261EC7650028A248 /* hb-ot-metrics.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD12261EC7640028A248 /* hb-ot-metrics.cc */; };
-		F384BD80261EC7650028A248 /* hb-ot-metrics.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD12261EC7640028A248 /* hb-ot-metrics.cc */; };
-		F384BD83261EC7650028A248 /* hb-shaper.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD13261EC7650028A248 /* hb-shaper.cc */; };
-		F384BD86261EC7650028A248 /* hb-shaper.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD13261EC7650028A248 /* hb-shaper.cc */; };
-		F384BD95261EC7650028A248 /* hb-ot-layout.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD16261EC7650028A248 /* hb-ot-layout.cc */; };
-		F384BD98261EC7650028A248 /* hb-ot-layout.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD16261EC7650028A248 /* hb-ot-layout.cc */; };
-		F384BDA7261EC7650028A248 /* hb-buffer-serialize.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD19261EC7650028A248 /* hb-buffer-serialize.cc */; };
-		F384BDAA261EC7650028A248 /* hb-buffer-serialize.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD19261EC7650028A248 /* hb-buffer-serialize.cc */; };
-		F384BDAD261EC7650028A248 /* hb-font.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD1A261EC7650028A248 /* hb-font.cc */; };
-		F384BDB0261EC7650028A248 /* hb-font.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD1A261EC7650028A248 /* hb-font.cc */; };
-		F384BDB9261EC7650028A248 /* hb-unicode.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD1C261EC7650028A248 /* hb-unicode.cc */; };
-		F384BDBC261EC7650028A248 /* hb-unicode.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD1C261EC7650028A248 /* hb-unicode.cc */; };
-		F384BDBF261EC7650028A248 /* hb-buffer.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD1D261EC7650028A248 /* hb-buffer.cc */; };
-		F384BDC2261EC7650028A248 /* hb-buffer.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD1D261EC7650028A248 /* hb-buffer.cc */; };
-		F384BDC5261EC7650028A248 /* hb-ot-cff2-table.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD1E261EC7650028A248 /* hb-ot-cff2-table.cc */; };
-		F384BDC8261EC7650028A248 /* hb-ot-cff2-table.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD1E261EC7650028A248 /* hb-ot-cff2-table.cc */; };
-		F384BDCB261EC7650028A248 /* hb-ot-face.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD1F261EC7650028A248 /* hb-ot-face.cc */; };
-		F384BDCE261EC7650028A248 /* hb-ot-face.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD1F261EC7650028A248 /* hb-ot-face.cc */; };
-		F384BDDD261EC7650028A248 /* hb-aat-layout.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD22261EC7650028A248 /* hb-aat-layout.cc */; };
-		F384BDE0261EC7650028A248 /* hb-aat-layout.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD22261EC7650028A248 /* hb-aat-layout.cc */; };
-		F384BDE3261EC7650028A248 /* hb-common.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD23261EC7650028A248 /* hb-common.cc */; };
-		F384BDE6261EC7650028A248 /* hb-common.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD23261EC7650028A248 /* hb-common.cc */; };
-		F384BDE9261EC7650028A248 /* hb-ot-cff1-table.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD24261EC7650028A248 /* hb-ot-cff1-table.cc */; };
-		F384BDEC261EC7650028A248 /* hb-ot-cff1-table.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD24261EC7650028A248 /* hb-ot-cff1-table.cc */; };
-		F384BDEF261EC7650028A248 /* hb-face.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD25261EC7650028A248 /* hb-face.cc */; };
-		F384BDF2261EC7650028A248 /* hb-face.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD25261EC7650028A248 /* hb-face.cc */; };
-		F384BDF5261EC7650028A248 /* hb-blob.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD26261EC7650028A248 /* hb-blob.cc */; };
-		F384BDF8261EC7650028A248 /* hb-blob.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD26261EC7650028A248 /* hb-blob.cc */; };
-		F384BDFB261EC7650028A248 /* hb-aat-map.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD27261EC7650028A248 /* hb-aat-map.cc */; };
-		F384BDFE261EC7650028A248 /* hb-aat-map.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD27261EC7650028A248 /* hb-aat-map.cc */; };
-		F384BE01261EC7650028A248 /* hb-ft.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD28261EC7650028A248 /* hb-ft.cc */; };
-		F384BE04261EC7650028A248 /* hb-ft.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD28261EC7650028A248 /* hb-ft.cc */; };
-		F384BE07261EC7650028A248 /* hb-ot-shape-normalize.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD29261EC7650028A248 /* hb-ot-shape-normalize.cc */; };
-		F384BE0A261EC7650028A248 /* hb-ot-shape-normalize.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD29261EC7650028A248 /* hb-ot-shape-normalize.cc */; };
-		F384BE0D261EC7650028A248 /* hb-ot-var.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD2A261EC7650028A248 /* hb-ot-var.cc */; };
-		F384BE10261EC7650028A248 /* hb-ot-var.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD2A261EC7650028A248 /* hb-ot-var.cc */; };
-		F384BE13261EC7650028A248 /* hb-ot-math.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD2B261EC7650028A248 /* hb-ot-math.cc */; };
-		F384BE16261EC7650028A248 /* hb-ot-math.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD2B261EC7650028A248 /* hb-ot-math.cc */; };
-		F384BE19261EC7650028A248 /* hb-ot-shape-fallback.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD2C261EC7650028A248 /* hb-ot-shape-fallback.cc */; };
-		F384BE1C261EC7650028A248 /* hb-ot-shape-fallback.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD2C261EC7650028A248 /* hb-ot-shape-fallback.cc */; };
-		F384BE1F261EC7650028A248 /* hb-ot-shape.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD2D261EC7650028A248 /* hb-ot-shape.cc */; };
-		F384BE22261EC7650028A248 /* hb-ot-shape.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BD2D261EC7650028A248 /* hb-ot-shape.cc */; };
-		F384BE48261EC9470028A248 /* hb-fallback-shape.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BE47261EC9470028A248 /* hb-fallback-shape.cc */; };
-		F384BE4B261EC9470028A248 /* hb-fallback-shape.cc in Sources */ = {isa = PBXBuildFile; fileRef = F384BE47261EC9470028A248 /* hb-fallback-shape.cc */; };
 		F384BE62261ECD9F0028A248 /* HarfBuzz-LICENSE.txt in Resources */ = {isa = PBXBuildFile; fileRef = F384BE60261ECD9F0028A248 /* HarfBuzz-LICENSE.txt */; };
 		F384BE65261ECD9F0028A248 /* FreeType-LICENSE.txt in Resources */ = {isa = PBXBuildFile; fileRef = F384BE61261ECD9F0028A248 /* FreeType-LICENSE.txt */; };
+		F3CD08872D8E22A400B1F9D2 /* harfbuzz.cc in Sources */ = {isa = PBXBuildFile; fileRef = F3CD08862D8E22A400B1F9D2 /* harfbuzz.cc */; };
+		F3CD08882D8E22A400B1F9D2 /* harfbuzz.cc in Sources */ = {isa = PBXBuildFile; fileRef = F3CD08862D8E22A400B1F9D2 /* harfbuzz.cc */; };
+		F3CD088C2D8E238100B1F9D2 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3CD088B2D8E238100B1F9D2 /* CoreFoundation.framework */; };
+		F3CD088D2D8E23A900B1F9D2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3CD08892D8E233B00B1F9D2 /* CoreGraphics.framework */; };
+		F3CD088F2D8E23DB00B1F9D2 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3CD088E2D8E23DB00B1F9D2 /* CoreText.framework */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -235,29 +132,6 @@
 
 /* Begin PBXFileReference section */
 		1014BAEA010A4B677F000001 /* SDL_ttf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_ttf.h; path = ../SDL_ttf.h; sourceTree = SOURCE_ROOT; };
-		618704E62B476A1500575B78 /* hb-outline.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 

(Patch may be truncated, please check the link at the top of this post.)