1
0
libqt5-qtwebengine/chromium-harfbuzz-3.0.0.patch
Christophe Giboudeaux 5a4dcfd768 Accepting request 920659 from home:Vogtinator:qt5.15
Third try:

- Add patches from Arch to fix build with HarfBuzz 3.0.0:
  * chromium-harfbuzz-3.0.0.patch
  * skia-harfbuzz-3.0.0.patch
- ... but don't break with < 2.9.0:
  * chromium-older-harfbuzz.patch

OBS-URL: https://build.opensuse.org/request/show/920659
OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.15/libqt5-qtwebengine?expand=0&rev=33
2021-09-22 17:19:46 +00:00

25 lines
1.2 KiB
Diff

Subject: Fix build with harfbuzz 3.0.0
Upstream backport copied from Arch and rebased.
# https://github.com/chromium/chromium/commit/b289f6f3fcbc
diff --git a/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc b/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc
index 8ff0540d9a..20a7d37474 100644
--- a/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc
+++ b/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc
@@ -72,9 +72,11 @@ sk_sp<SkData> SubsetFont(SkTypeface* typeface, const GlyphUsage& usage) {
hb_set_t* glyphs =
hb_subset_input_glyph_set(input.get()); // Owned by |input|.
usage.ForEach(base::BindRepeating(&AddGlyphs, base::Unretained(glyphs)));
- hb_subset_input_set_retain_gids(input.get(), true);
+ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS);
- HbScoped<hb_face_t> subset_face(hb_subset(face.get(), input.get()));
+ HbScoped<hb_face_t> subset_face(hb_subset_or_fail(face.get(), input.get()));
+ if (!subset_face)
+ return nullptr;
HbScoped<hb_blob_t> subset_blob(hb_face_reference_blob(subset_face.get()));
if (!subset_blob)
return nullptr;