Skip to content

Commit 7ec9adb

Browse files
aosc-buildit-botMingcongBai
authored andcommitted
freetype: update to 2.13.2
- Backport an upstream-NAK patch to fix bold typefaces in WPS Office. - Track patches at AOSC-Tracking/freetype @ aosc/VER-2-13-2.
1 parent 8073baa commit 7ec9adb

File tree

2 files changed

+44
-3
lines changed

2 files changed

+44
-3
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
From ae0ac2d1217a0be13db0a7e4eeec46085b0b6775 Mon Sep 17 00:00:00 2001
2+
From: Fushan Wen <[email protected]>
3+
Date: Sun, 17 Sep 2023 13:15:29 +0800
4+
Subject: [PATCH] src/base/ftsynth.c: keep compatiblity in
5+
FT_GlyphSlot_Embolden
6+
7+
The delta is highly a matter of taste, but the style should be consistent. In some old applications x_scale and y_scale do not always match x_ppem and y_ppem, so fixed delta values will break bold fonts in those existing applications.
8+
---
9+
src/base/ftsynth.c | 17 ++++++++++++++++-
10+
1 file changed, 16 insertions(+), 1 deletion(-)
11+
12+
diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c
13+
index f32edd338..c397a374f 100644
14+
--- a/src/base/ftsynth.c
15+
+++ b/src/base/ftsynth.c
16+
@@ -98,7 +98,22 @@
17+
FT_EXPORT_DEF( void )
18+
FT_GlyphSlot_Embolden( FT_GlyphSlot slot )
19+
{
20+
- FT_GlyphSlot_AdjustWeight( slot, 0x0AAA, 0x0AAA );
21+
+ FT_UShort units_per_EM;
22+
+ FT_Size_Metrics* metrics;
23+
+ FT_Fixed xdelta, ydelta;
24+
+
25+
+ if ( !slot )
26+
+ return;
27+
+
28+
+ units_per_EM = slot->face->units_per_EM;
29+
+ metrics = &( slot->face->size->metrics );
30+
+
31+
+ xdelta = FT_MulFix( units_per_EM, metrics->x_scale / 24 ) * 1024 /
32+
+ (FT_Pos)metrics->x_ppem;
33+
+ ydelta = FT_MulFix( units_per_EM, metrics->y_scale / 24 ) * 1024 /
34+
+ (FT_Pos)metrics->y_ppem;
35+
+
36+
+ FT_GlyphSlot_AdjustWeight( slot, xdelta, ydelta );
37+
}
38+
39+
40+
--
41+
2.45.2
42+

runtime-desktop/freetype/spec

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
VER=2.12.1
2-
REL=3
1+
VER=2.13.2
32
SRCS="tbl::https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$VER.tar.xz"
4-
CHKSUMS="sha256::4766f20157cc4cf0cd292f80bf917f92d1c439b243ac3018debf6b9140c41a7f"
3+
CHKSUMS="sha256::12991c4e55c506dd7f9b765933e62fd2be2e06d421505d7950a132e4f1bb484d"
54
CHKUPDATE="anitya::id=854"

0 commit comments

Comments
 (0)