Date: Sunday, February 12, 2023 @ 15:15:04
Author: foutrelis
Revision: 1400054
upgpkg: electron17 17.4.11-5: FreeType 2.13 rebuild (FS#77459)
Added:
electron17/trunk/skia-freetype-2.13.patch
Modified:
electron17/trunk/PKGBUILD
--------------------------+
PKGBUILD | 9 +++++++-
skia-freetype-2.13.patch | 50 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 1 deletion(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2023-02-12 15:14:45 UTC (rev 1400053)
+++ PKGBUILD 2023-02-12 15:15:04 UTC (rev 1400054)
@@ -6,7 +6,7 @@
_chromiumver=98.0.4758.141
_gcc_patchset=5
# shellcheck disable=SC2034
-pkgrel=4
+pkgrel=5
_major_ver=${pkgver%%.*}
if [[ ${_use_suffix} != 0 ]]; then
@@ -61,6 +61,7 @@
'sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch'
'breakpad-fix-for-non-constant-SIGSTKSZ.patch'
'use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch'
+ 'skia-freetype-2.13.patch'
'sql-make-VirtualCursor-standard-layout-type.patch'
)
# shellcheck disable=SC2034
@@ -80,6 +81,7 @@
'f910be9370c880de6e1d61cc30383c069e421d7acf406166e4fbfad324fc7d61'
'b4d28867c1fabde6c50a2cfa3f784730446c4d86e5191e0f0000fbf7b0f91ecf'
'9c9c280be968f06d269167943680fb72a26fbb05d8c15f60507e316e8a9075d5'
+ '8679ad2313b9ddbd896262f6f79d849c4a82d2189d52042809e7cf4b1fc7d8e3'
'b94b2e88f63cfb7087486508b8139599c89f96d7a4181c61fec4b4e250ca327a'
)
@@ -182,6 +184,7 @@
patch -Np1 -i ../sandbox-build-if-glibc-2.34-dynamic-stack-size-is-en.patch
patch -Np1 -d third_party/breakpad/breakpad
<../breakpad-fix-for-non-constant-SIGSTKSZ.patch
patch -Np1 -d third_party/pdfium
<../use-FT_Done_MM_Var-in-CFX_Font-AdjustMMParams.patch
+ patch -Np1 -d third_party/skia <../skia-freetype-2.13.patch
# https://chromium-review.googlesource.com/c/chromium/src/+/2862724
patch -Np1 -i ../sql-make-VirtualCursor-standard-layout-type.patch
@@ -236,6 +239,10 @@
CFLAGS+=' -Wno-unknown-warning-option'
CXXFLAGS+=' -Wno-unknown-warning-option'
+ # Let Chromium set its own symbol level
+ CFLAGS=${CFLAGS/-g }
+ CXXFLAGS=${CXXFLAGS/-g }
+
cd src || exit
export CHROMIUM_BUILDTOOLS_PATH="${PWD}/buildtools"
GN_EXTRA_ARGS='
Added: skia-freetype-2.13.patch
===================================================================
--- skia-freetype-2.13.patch (rev 0)
+++ skia-freetype-2.13.patch 2023-02-12 15:15:04 UTC (rev 1400054)
@@ -0,0 +1,50 @@
+From 857915f72b73fab0a9d195d778ad53edd441c8de Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= <[email protected]>
+Date: Tue, 21 Jun 2022 17:33:38 +0300
+Subject: [PATCH] Prepare for FreeType change from FT_F2Dot14 to FT_Fixed for
+ stop_offset
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In order to support a larger range for stop offsets in variable fonts, I
+plan to resize the stop_offset field to 16.16 in FreeType. Prepare Skia
+for handling that change.
+
+Bug: chromium:1311241
+Change-Id: I1da46a3e4c79f2f3d091e65005c19d16dc382669
+Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551638
+Reviewed-by: Florin Malita <[email protected]>
+Commit-Queue: Dominik Röttsches <[email protected]>
+
+(cherry picked from commit c1373396b85792ee6cf7fcc16870bd3d7e9d0c93)
+---
+ src/ports/SkFontHost_FreeType_common.cpp | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/ports/SkFontHost_FreeType_common.cpp
b/src/ports/SkFontHost_FreeType_common.cpp
+index db5dd285b7..1b57188d55 100644
+--- a/src/ports/SkFontHost_FreeType_common.cpp
++++ b/src/ports/SkFontHost_FreeType_common.cpp
+@@ -75,6 +75,12 @@ const char* SkTraceFtrGetError(int e) {
+ bool operator==(const FT_OpaquePaint& a, const FT_OpaquePaint& b) {
+ return a.p == b.p && a.insert_root_transform == b.insert_root_transform;
+ }
++
++// The stop_offset field is being upgraded to a larger representation in
FreeType, and changed from
++// 2.14 to 16.16. Adjust the shift factor depending on size type.
++static_assert(sizeof(FT_Fixed) != sizeof(FT_F2Dot14));
++constexpr float kColorStopShift =
++ sizeof(FT_ColorStop::stop_offset) == sizeof(FT_F2Dot14) ? 1 << 14 : 1 <<
16;
+ #endif
+
+ namespace {
+@@ -528,7 +534,7 @@ bool colrv1_configure_skpaint(FT_Face face,
+ FT_ColorStop color_stop;
+ while (FT_Get_Colorline_Stops(face, &color_stop,
&color_stop_iterator)) {
+ FT_UInt index = color_stop_iterator.current_color_stop - 1;
+- sorted_stops[index].stop_pos = color_stop.stop_offset / float(1
<< 14);
++ sorted_stops[index].stop_pos = color_stop.stop_offset /
kColorStopShift;
+ FT_UInt16& palette_index = color_stop.color.palette_index;
+ if (palette_index == kForegroundColorPaletteIndex) {
+ U8CPU newAlpha = SkColorGetA(foregroundColor) *