Skip to content

Commit 7301019

Browse files
committed
Update FreeType to 2.13.3
1 parent 9d27272 commit 7301019

File tree

15 files changed

+73
-1905
lines changed

15 files changed

+73
-1905
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ repos:
2020
- id: check-docstring-first
2121
exclude: lib/matplotlib/typing.py # docstring used for attribute flagged by check
2222
- id: end-of-file-fixer
23-
exclude_types: [svg]
23+
exclude_types: [diff, svg]
2424
- id: mixed-line-ending
2525
- id: name-tests-test
2626
args: ["--pytest-test-first"]
2727
- id: no-commit-to-branch # Default is master and main.
2828
- id: trailing-whitespace
29-
exclude_types: [svg]
29+
exclude_types: [diff, svg]
3030
- repo: https://github.com/pre-commit/mirrors-mypy
3131
rev: v1.14.1
3232
hooks:

extern/meson.build

+11-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,20 @@ else
1313
# must match the value in `lib/matplotlib.__init__.py`. Also update the docs
1414
# in `docs/devel/dependencies.rst`. Bump the cache key in
1515
# `.circleci/config.yml` when changing requirements.
16-
LOCAL_FREETYPE_VERSION = '2.6.1'
16+
LOCAL_FREETYPE_VERSION = '2.13.3'
1717

1818
freetype_proj = subproject(
1919
f'freetype-@LOCAL_FREETYPE_VERSION@',
20-
default_options: ['default_library=static'])
20+
default_options: [
21+
'default_library=static',
22+
'brotli=disabled',
23+
'bzip2=disabled',
24+
'harfbuzz=disabled',
25+
'mmap=auto',
26+
'png=disabled',
27+
'tests=disabled',
28+
'zlib=internal',
29+
])
2130
freetype_dep = freetype_proj.get_variable('freetype_dep')
2231
endif
2332

lib/matplotlib/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ def _val_or_rc(val, rc_name):
13171317
def _init_tests():
13181318
# The version of FreeType to install locally for running the tests. This must match
13191319
# the value in `meson.build`.
1320-
LOCAL_FREETYPE_VERSION = '2.6.1'
1320+
LOCAL_FREETYPE_VERSION = '2.13.3'
13211321

13221322
from matplotlib import ft2font
13231323
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or

lib/matplotlib/tests/test_axes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8139,7 +8139,7 @@ def test_normal_axes():
81398139
]
81408140
for nn, b in enumerate(bbaxis):
81418141
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
8142-
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
8142+
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=0)
81438143

81448144
target = [
81458145
[150.0, 119.999, 930.0, 11.111],
@@ -8157,7 +8157,7 @@ def test_normal_axes():
81578157

81588158
target = [85.5138, 75.88888, 1021.11, 1017.11]
81598159
targetbb = mtransforms.Bbox.from_bounds(*target)
8160-
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
8160+
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=0)
81618161

81628162
# test that get_position roundtrips to get_window_extent
81638163
axbb = ax.get_position().transformed(fig.transFigure).bounds

lib/matplotlib/tests/test_ft2font.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -706,10 +706,10 @@ def test_ft2font_get_sfnt_table(font_name, header):
706706

707707
@pytest.mark.parametrize('left, right, unscaled, unfitted, default', [
708708
# These are all the same class.
709-
('A', 'A', 57, 248, 256), ('A', 'À', 57, 248, 256), ('A', 'Á', 57, 248, 256),
710-
('A', 'Â', 57, 248, 256), ('A', 'Ã', 57, 248, 256), ('A', 'Ä', 57, 248, 256),
709+
('A', 'A', 57, 247, 256), ('A', 'À', 57, 247, 256), ('A', 'Á', 57, 247, 256),
710+
('A', 'Â', 57, 247, 256), ('A', 'Ã', 57, 247, 256), ('A', 'Ä', 57, 247, 256),
711711
# And a few other random ones.
712-
('D', 'A', -36, -156, -128), ('T', '.', -243, -1056, -1024),
712+
('D', 'A', -36, -156, -128), ('T', '.', -243, -1055, -1024),
713713
('X', 'C', -149, -647, -640), ('-', 'J', 114, 495, 512),
714714
])
715715
def test_ft2font_get_kerning(left, right, unscaled, unfitted, default):

lib/matplotlib/tests/test_legend.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,10 @@ def test_figure_legend_outside():
469469
todos += ['left ' + pos for pos in ['lower', 'center', 'upper']]
470470
todos += ['right ' + pos for pos in ['lower', 'center', 'upper']]
471471

472-
upperext = [20.347556, 27.722556, 790.583, 545.499]
473-
lowerext = [20.347556, 71.056556, 790.583, 588.833]
474-
leftext = [151.681556, 27.722556, 790.583, 588.833]
475-
rightext = [20.347556, 27.722556, 659.249, 588.833]
472+
upperext = [20.347556, 24.722556, 790.5205, 546.499]
473+
lowerext = [20.347556, 68.056556, 790.5205, 589.833]
474+
leftext = [151.681556, 24.722556, 790.5205, 589.833]
475+
rightext = [20.347556, 24.722556, 659.1865, 589.833]
476476
axbb = [upperext, upperext, upperext,
477477
lowerext, lowerext, lowerext,
478478
leftext, leftext, leftext,

lib/matplotlib/tests/test_polar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def test_get_tightbbox_polar():
328328
fig.canvas.draw()
329329
bb = ax.get_tightbbox(fig.canvas.get_renderer())
330330
assert_allclose(
331-
bb.extents, [107.7778, 29.2778, 539.7847, 450.7222], rtol=1e-03)
331+
bb.extents, [107.7153, 28.7778, 539.7847, 451.2222], rtol=1e-03)
332332

333333

334334
@check_figures_equal()

subprojects/freetype-2.13.3.wrap

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[wrap-file]
2+
directory = freetype-2.13.3
3+
source_url = https://download.savannah.gnu.org/releases/freetype/freetype-2.13.3.tar.xz
4+
source_fallback_url = https://downloads.sourceforge.net/project/freetype/freetype2/2.13.3/freetype-2.13.3.tar.xz
5+
source_filename = freetype-2.13.3.tar.xz
6+
source_hash = 0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289
7+
8+
# https://gitlab.freedesktop.org/freetype/freetype/-/commit/34aed655f1696da774b5cdd4c5effb312153232f
9+
diff_files = freetype-34aed655f1696da774b5cdd4c5effb312153232f.patch
10+
11+
[provide]
12+
freetype2 = freetype_dep
13+
freetype = freetype_dep

subprojects/freetype-2.6.1.wrap

-10
This file was deleted.

subprojects/packagefiles/freetype-2.6.1-meson/LICENSE.build

-19
This file was deleted.

0 commit comments

Comments
 (0)