slackbuilds/office/LibreOffice/skia-freetype-2.11.diff

52 lines
2.2 KiB
Diff

--- external/skia/UnpackedTarball_skia.mk.orig 2021-08-23 22:03:48.538000000 +1000
+++ external/skia/UnpackedTarball_skia.mk 2021-08-23 22:04:58.137000000 +1000
@@ -39,6 +39,7 @@
fast-png-write.patch.1 \
skia_sk_cpu_sse_level_0_by_default.patch.1 \
fix-warnings.patch.1 \
+ skia_freetype-2.11.patch.0 \
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
--- /dev/null 2021-08-23 17:37:05.741000000 +1000
+++ external/skia/skia_freetype-2.11.patch.0 2021-08-23 22:01:05.176000000 +1000
@@ -0,0 +1,38 @@
+--- src/ports/SkFontHost_FreeType_common.cpp.orig 2021-03-02 00:53:09.178606791 +1000
++++ src/ports/SkFontHost_FreeType_common.cpp 2021-08-23 21:58:57.678000000 +1000
+@@ -665,8 +665,13 @@
+ canvas->drawPaint(paint);
+ break;
+ }
++#ifdef FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
++ case FT_COLR_PAINTFORMAT_TRANSFORM: {
++ SkMatrix transform = ToSkMatrix(colrv1_paint.u.transform.affine);
++#else
+ case FT_COLR_PAINTFORMAT_TRANSFORMED: {
+ SkMatrix transform = ToSkMatrix(colrv1_paint.u.transformed.affine);
++#endif
+
+ canvas->concat(transform);
+ break;
+@@ -760,12 +765,21 @@
+ traverse_result = colrv1_start_glyph(canvas, palette, face, paint.u.colr_glyph.glyphID,
+ FT_COLOR_NO_ROOT_TRANSFORM);
+ break;
++#ifdef FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
++ case FT_COLR_PAINTFORMAT_TRANSFORM:
++ canvas->saveLayer(nullptr, nullptr);
++ // Traverse / draw operation will apply transform.
++ colrv1_draw_paint(canvas, palette, face, paint);
++ traverse_result =
++ colrv1_traverse_paint(canvas, palette, face, paint.u.transform.paint);
++#else
+ case FT_COLR_PAINTFORMAT_TRANSFORMED:
+ canvas->saveLayer(nullptr, nullptr);
+ // Traverse / draw operation will apply transform.
+ colrv1_draw_paint(canvas, palette, face, paint);
+ traverse_result =
+ colrv1_traverse_paint(canvas, palette, face, paint.u.transformed.paint);
++#endif
+ canvas->restore();
+ break;
+ case FT_COLR_PAINTFORMAT_ROTATE: