patch use of deprecated harfbuzz apis

epel9
Rex Dieter 3 years ago
parent 09d1fc370f
commit db3b70b97f

@ -111,6 +111,8 @@ Patch31: qtwebengine-everywhere-src-5.15.5-TRUE.patch
# Issue 1213452: Sandbox doesn't work with clone3
# https://bugs.chromium.org/p/chromium/issues/detail?id=1213452
Patch32: qtwebengine-everywhere-src-5.15.6-clone3.patch
# Fix use of deprecated harfbuzz api's
Patch33: qtwebengine-harfbuzz.patch
## Upstream patches:
@ -420,6 +422,7 @@ popd
%patch30 -p1 -b .SIGSTKSZ
%patch31 -p1 -b .TRUE
%patch32 -p1 -b .clone3
%patch33 -p1 -b .harfbuzz
# delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we
# never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS
@ -632,7 +635,7 @@ done
%changelog
* Mon Sep 20 2021 Rex Dieter <rdieter@fedoraproject.org> - 5.15.6-2
- rebuild (harfbuzz)
- patch use of deprecated harfbuzz apis
* Fri Sep 03 2021 Rex Dieter <rdieter@fedoraproject.org> - 5.15.6-1
- 5.15.6

@ -0,0 +1,34 @@
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 ba5391708..8565b67e3 100644
--- a/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc
+++ b/src/3rdparty/chromium/components/paint_preview/common/subset_font.cc
@@ -71,9 +71,9 @@ 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()));
+ HbFace subset_face(hb_subset_or_fail(face.get(), input.get()));
HbScoped<hb_blob_t> subset_blob(hb_face_reference_blob(subset_face.get()));
if (!subset_blob)
return nullptr;
diff --git a/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp b/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp
index 81c37eef3..1581fb8a9 100644
--- a/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp
+++ b/src/3rdparty/chromium/third_party/skia/src/pdf/SkPDFSubsetFont.cpp
@@ -71,11 +71,10 @@ static sk_sp<SkData> subset_harfbuzz(sk_sp<SkData> fontData,
hb_set_t* glyphs = hb_subset_input_glyph_set(input.get());
glyphUsage.getSetValues([&glyphs](unsigned gid) { hb_set_add(glyphs, gid);});
- hb_subset_input_set_retain_gids(input.get(), true);
// TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY.
// If it isn't known if a font is 'tricky', retain the hints.
- hb_subset_input_set_drop_hints(input.get(), false);
- HBFace subset(hb_subset(face.get(), input.get()));
+ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS | HB_SUBSET_FLAGS_NO_HINTING);
+ HBFace subset(hb_subset_or_fail(face.get(), input.get()));
HBBlob result(hb_face_reference_blob(subset.get()));
return to_data(std::move(result));
}
Loading…
Cancel
Save