office/LibreOffice: Reenable Skia font rendering

Signed-off-by: Christoph Willing <chris.willing@linux.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Christoph Willing 2021-08-24 07:59:08 +10:00 committed by Willy Sudiarto Raharjo
parent 03a6e0502b
commit a00610eb4b
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 53 additions and 2 deletions

View File

@ -30,7 +30,7 @@ PRGNAM=LibreOffice
SRCNAM=libreoffice
VERSION=${VERSION:-7.2.0.4}
SHORT_VERSION=${VERSION%.*.*}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -201,7 +201,6 @@ extnlpsolver="--enable-ext-nlpsolver"; [ "${EXTNLPSOLVER:-yes}" != "yes" ] &
--enable-qt5 \
--enable-python=system \
--enable-gio \
--disable-skia \
$extct2n \
$extnumbertext \
$extnlpsolver \
@ -290,6 +289,7 @@ if [ "$HAVE_SRCS_TARBALL" = "0" ]; then
fi
patch -p0 < $CWD/no-check-if-root.diff
patch -p0 < $CWD/skia-freetype-2.11.diff
# GCC10 requirements (Tx alienBOB)
sed -i external/libebook/ExternalProject_libebook.mk \

View File

@ -0,0 +1,51 @@
--- 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: