Skip to content

Commit d57abf4

Browse files
authored
Merge pull request #30938 from QuLogic/ft214
Update bundled FreeType and HarfBuzz libraries
2 parents b736a90 + 9619bcc commit d57abf4

File tree

8 files changed

+59
-98
lines changed

8 files changed

+59
-98
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ commands:
6767
fonts-install:
6868
steps:
6969
- restore_cache:
70-
key: fonts-4
70+
key: fonts-5
7171
- run:
7272
name: Install custom fonts
7373
command: |
@@ -80,7 +80,7 @@ commands:
8080
-O ~/.local/share/fonts/xkcd-Script.ttf || true
8181
fc-cache -f -v
8282
- save_cache:
83-
key: fonts-4
83+
key: fonts-5
8484
paths:
8585
- ~/.local/share/fonts/
8686

@@ -125,7 +125,7 @@ commands:
125125
--no-build-isolation --editable .[dev]
126126
fi
127127
- save_cache:
128-
key: build-deps-2
128+
key: build-deps-3
129129
paths:
130130
- subprojects/packagecache
131131

extern/meson.build

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ else
1515
'default_library=static',
1616
'brotli=disabled',
1717
'bzip2=disabled',
18-
'harfbuzz=disabled',
18+
get_option('system-libraqm') ? 'harfbuzz=disabled' : 'harfbuzz=static',
1919
'mmap=auto',
2020
'png=disabled',
2121
'tests=disabled',
@@ -30,17 +30,25 @@ else
3030
subproject('harfbuzz',
3131
default_options: [
3232
'default_library=static',
33+
'benchmark=disabled',
3334
'cairo=disabled',
35+
'chafa=disabled',
3436
'coretext=disabled',
3537
'directwrite=disabled',
38+
'docs=disabled',
39+
'doc_tests=false',
3640
'fontations=disabled',
3741
'freetype=enabled',
3842
'gdi=disabled',
3943
'glib=disabled',
4044
'gobject=disabled',
41-
'harfruzz=disabled',
45+
'harfrust=disabled',
4246
'icu=disabled',
47+
'introspection=disabled',
48+
'kbts=disabled',
4349
'tests=disabled',
50+
'utilities=disabled',
51+
'wasm=disabled',
4452
]
4553
)
4654
subproject('sheenbidi', default_options: ['default_library=static'])

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ def _val_or_rc(val, *rc_names):
13351335
def _init_tests():
13361336
# The version of FreeType to install locally for running the tests. This must match
13371337
# the value in `subprojects/freetype2.wrap`.
1338-
LOCAL_FREETYPE_VERSION = '2.13.3'
1338+
LOCAL_FREETYPE_VERSION = '2.14.1'
13391339

13401340
from matplotlib import ft2font
13411341
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or

subprojects/freetype2.wrap

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
# This is the version of FreeType to use when building a local version. It
2-
# must match the value in `lib/matplotlib.__init__.py`. Also update the docs
3-
# in `docs/devel/dependencies.rst`. Bump the cache key in
4-
# `.circleci/config.yml` when changing requirements.
1+
# This is the version of FreeType to use when building a local version. It must match
2+
# the `LOCAL_FREETYPE_VERSION` value in `lib/matplotlib/__init__.py`. Bump the cache key
3+
# in `.circleci/config.yml` when changing requirements.
54
[wrap-file]
6-
directory = freetype-2.13.3
7-
source_url = https://download.savannah.gnu.org/releases/freetype/freetype-2.13.3.tar.xz
8-
source_fallback_url = https://downloads.sourceforge.net/project/freetype/freetype2/2.13.3/freetype-2.13.3.tar.xz
9-
source_filename = freetype-2.13.3.tar.xz
10-
source_hash = 0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289
5+
directory = freetype-2.14.1
6+
source_url = https://download.savannah.gnu.org/releases/freetype/freetype-2.14.1.tar.xz
7+
source_fallback_url = https://downloads.sourceforge.net/project/freetype/freetype2/2.14.1/freetype-2.14.1.tar.xz
8+
source_filename = freetype-2.14.1.tar.xz
9+
source_hash = 32427e8c471ac095853212a37aef816c60b42052d4d9e48230bab3bdf2936ccc
1110

12-
# https://gitlab.freedesktop.org/freetype/freetype/-/commit/34aed655f1696da774b5cdd4c5effb312153232f
13-
diff_files = freetype-34aed655f1696da774b5cdd4c5effb312153232f.patch
11+
# This patch allows using our bundled HarfBuzz.
12+
diff_files = freetype-2.14.1-static-harfbuzz.patch
1413

1514
[provide]
1615
freetype2 = freetype_dep

subprojects/harfbuzz.wrap

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
[wrap-file]
2-
directory = harfbuzz-11.2.1
3-
source_url = https://github.com/harfbuzz/harfbuzz/releases/download/11.2.1/harfbuzz-11.2.1.tar.xz
4-
source_filename = harfbuzz-11.2.1.tar.xz
5-
source_hash = 093714c8548a285094685f0bdc999e202d666b59eeb3df2ff921ab68b8336a49
6-
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/harfbuzz_11.2.1-1/harfbuzz-11.2.1.tar.xz
7-
wrapdb_version = 11.2.1-1
8-
9-
# This patch allows using our bundled FreeType.
10-
diff_files = harfbuzz-11.2.0-bundle-freetype.patch
2+
directory = harfbuzz-12.3.0
3+
source_url = https://github.com/harfbuzz/harfbuzz/releases/download/12.3.0/harfbuzz-12.3.0.tar.xz
4+
source_filename = harfbuzz-12.3.0.tar.xz
5+
source_hash = 8660ebd3c27d9407fc8433b5d172bafba5f0317cb0bb4339f28e5370c93d42b7
6+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/harfbuzz_12.3.0-1/harfbuzz-12.3.0.tar.xz
7+
wrapdb_version = 12.3.0-1
118

129
[provide]
1310
dependency_names = harfbuzz, harfbuzz-cairo, harfbuzz-gobject, harfbuzz-icu, harfbuzz-subset
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
diff -uPNr freetype-2.14.1.orig/meson.build freetype-2.14.1/meson.build
2+
--- freetype-2.14.1.orig/meson.build 2025-09-11 07:12:24.000000000 -0400
3+
+++ freetype-2.14.1/meson.build 2026-01-04 15:49:14.198061441 -0500
4+
@@ -364,6 +364,13 @@
5+
endif
6+
endif
7+
8+
+if harfbuzz_opt == 'static'
9+
+ harfbuzz_dep = declare_dependency()
10+
+ harfbuzz_opt = 'YES'
11+
+ ftoption_command += ['--enable=FT_CONFIG_OPTION_USE_HARFBUZZ']
12+
+ ft2_deps += [harfbuzz_dep]
13+
+endif
14+
+
15+
if not harfbuzz_dep.found() and \
16+
(harfbuzz_opt == 'dynamic' or harfbuzz_opt == 'auto')
17+
# On Windows we don't need libdl, but on other platforms we need it.
18+
diff -uPNr freetype-2.14.1.orig/meson_options.txt freetype-2.14.1/meson_options.txt
19+
--- freetype-2.14.1.orig/meson_options.txt 2025-09-07 22:48:18.000000000 -0400
20+
+++ freetype-2.14.1/meson_options.txt 2026-01-04 15:49:30.087034418 -0500
21+
@@ -24,7 +24,7 @@
22+
23+
option('harfbuzz',
24+
type: 'combo',
25+
- choices: ['auto', 'enabled', 'dynamic', 'disabled'],
26+
+ choices: ['auto', 'enabled', 'dynamic', 'static', 'disabled'],
27+
value: 'auto',
28+
description: 'Use Harfbuzz library to improve auto-hinting;'
29+
+ ' if available, many glyphs not directly addressable'

subprojects/packagefiles/freetype-34aed655f1696da774b5cdd4c5effb312153232f.patch

Lines changed: 0 additions & 36 deletions
This file was deleted.

subprojects/packagefiles/harfbuzz-11.2.0-bundle-freetype.patch

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)