diff options
Diffstat (limited to 'external/harfbuzz')
-rw-r--r-- | external/harfbuzz/ExternalProject_harfbuzz.mk | 8 | ||||
-rw-r--r-- | external/harfbuzz/README | 6 | ||||
-rw-r--r-- | external/harfbuzz/UnpackedTarball_harfbuzz.mk | 5 | ||||
-rw-r--r-- | external/harfbuzz/negativeadvance.patch | 11 | ||||
-rw-r--r-- | external/harfbuzz/tdf159529.patch.0 | 28 |
5 files changed, 37 insertions, 21 deletions
diff --git a/external/harfbuzz/ExternalProject_harfbuzz.mk b/external/harfbuzz/ExternalProject_harfbuzz.mk index caf6bcd5f922..9c8dd804e8f0 100644 --- a/external/harfbuzz/ExternalProject_harfbuzz.mk +++ b/external/harfbuzz/ExternalProject_harfbuzz.mk @@ -41,16 +41,14 @@ $(call gb_ExternalProject_get_state_target,harfbuzz,build) : $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ $(if $(gb_FULLDEPS),,--disable-dependency-tracking) \ --libdir=$(call gb_UnpackedTarball_get_dir,harfbuzz/src/.libs) \ - $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + $(gb_CONFIGURE_PLATFORMS) \ CXXFLAGS=' \ $(if $(filter ANDROID,$(OS)),-DHB_NO_MMAP=1,) \ - $(if $(call gb_Module__symbols_enabled,harfbuzz),$(gb_DEBUGINFO_FLAGS)) \ - $(if $(ENABLE_OPTIMIZED), \ - $(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \ + $(call gb_ExternalProject_get_build_flags,harfbuzz) \ $(if $(ENABLE_RUNTIME_OPTIMIZATIONS),,-frtti) \ $(CXXFLAGS) $(CXXFLAGS_CXX11) \ - $(ICU_UCHAR_TYPE) \ $(if $(filter LINUX,$(OS)),-fvisibility=hidden)' \ + LDFLAGS="$(call gb_ExternalProject_get_link_flags,harfbuzz)" \ MAKE=$(MAKE) \ && (cd $(EXTERNAL_WORKDIR)/src && $(MAKE) lib) \ ) diff --git a/external/harfbuzz/README b/external/harfbuzz/README index d2af8b559ad1..557c0a724ce8 100644 --- a/external/harfbuzz/README +++ b/external/harfbuzz/README @@ -1 +1,5 @@ -HarfBuzz is an OpenType text shaping engine. From [http://harfbuzz.org/]. +HarfBuzz is an OpenType text shaping engine. + +From [https://harfbuzz.github.io/]. + +Release archives at [https://github.com/harfbuzz/harfbuzz/releases]. diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk index 83df909aaf99..71627725fae7 100644 --- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk +++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk @@ -15,11 +15,8 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,harfbuzz)) $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0)) -# * external/harfbuzz/negativeadvance.patch sent upstram as -# <https://github.com/harfbuzz/harfbuzz/pull/3128> "hb_graphite2_cluster_t::advance can apparently -# be negative": $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \ - external/harfbuzz/negativeadvance.patch \ + external/harfbuzz/tdf159529.patch.0 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/harfbuzz/negativeadvance.patch b/external/harfbuzz/negativeadvance.patch deleted file mode 100644 index ab19aa2631e0..000000000000 --- a/external/harfbuzz/negativeadvance.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/hb-graphite2.cc -+++ src/hb-graphite2.cc -@@ -223,7 +223,7 @@ - unsigned int base_glyph; - unsigned int num_glyphs; - unsigned int cluster; -- unsigned int advance; -+ int advance; - }; - - hb_bool_t diff --git a/external/harfbuzz/tdf159529.patch.0 b/external/harfbuzz/tdf159529.patch.0 new file mode 100644 index 000000000000..d76313ce83be --- /dev/null +++ b/external/harfbuzz/tdf159529.patch.0 @@ -0,0 +1,28 @@ +--- ./src/hb-ot-font.cc 2023-11-11 09:08:45 ++++ ./src/hb-ot-font.cc 2024-02-20 18:53:55 +@@ -428,13 +428,23 @@ + const hb_ot_face_t *ot_face = ot_font->ot_face; + + #if !defined(HB_NO_OT_FONT_BITMAP) && !defined(HB_NO_COLOR) +- if (ot_face->sbix->get_extents (font, glyph, extents)) return true; ++ /* tdf#159529 clear the hb_ot_face_t's data after fetching 'sbix' table ++ * The 'sbix' table can be very large for color emoji fonts so clear any ++ * cached data in hb_ot_face_t after fetching that table's extents. */ ++ bool sbixResult = ot_face->sbix->get_extents (font, glyph, extents); ++ const_cast<hb_ot_face_t*>(ot_face)->sbix.fini (); ++ if (sbixResult) return true; + if (ot_face->CBDT->get_extents (font, glyph, extents)) return true; + #endif + #if !defined(HB_NO_COLOR) && !defined(HB_NO_PAINT) + if (ot_face->COLR->get_extents (font, glyph, extents)) return true; + #endif +- if (ot_face->glyf->get_extents (font, glyph, extents)) return true; ++ /* tdf#159529 clear the hb_ot_face_t's data after fetching 'glyf' table ++ * The 'glyf' table can be very large for color emoji fonts so clear any ++ * cached data in hb_ot_face_t after fetching that table's extents. */ ++ bool glyfResult = ot_face->glyf->get_extents (font, glyph, extents); ++ const_cast<hb_ot_face_t*>(ot_face)->glyf.fini (); ++ if (glyfResult) return true; + #ifndef HB_NO_OT_FONT_CFF + if (ot_face->cff2->get_extents (font, glyph, extents)) return true; + if (ot_face->cff1->get_extents (font, glyph, extents)) return true; |