chromium-harfbuzz-3.0.0.patch 1016 B

1234567891011121314151617181920
  1. # https://github.com/chromium/chromium/commit/b289f6f3fcbc
  2. diff --git a/components/paint_preview/common/subset_font.cc b/components/paint_preview/common/subset_font.cc
  3. index 8ff0540d9a..20a7d37474 100644
  4. --- a/components/paint_preview/common/subset_font.cc
  5. +++ b/components/paint_preview/common/subset_font.cc
  6. @@ -72,9 +72,11 @@ sk_sp<SkData> SubsetFont(SkTypeface* typeface, const GlyphUsage& usage) {
  7. hb_set_t* glyphs =
  8. hb_subset_input_glyph_set(input.get()); // Owned by |input|.
  9. usage.ForEach(base::BindRepeating(&AddGlyphs, base::Unretained(glyphs)));
  10. - hb_subset_input_set_retain_gids(input.get(), true);
  11. + hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS);
  12. - HbScoped<hb_face_t> subset_face(hb_subset(face.get(), input.get()));
  13. + HbScoped<hb_face_t> subset_face(hb_subset_or_fail(face.get(), input.get()));
  14. + if (!subset_face)
  15. + return nullptr;
  16. HbScoped<hb_blob_t> subset_blob(hb_face_reference_blob(subset_face.get()));
  17. if (!subset_blob)
  18. return nullptr;