8000 Update FreeType to 2.13.3 · QuLogic/matplotlib@785e2bd · GitHub
[go: up one dir, main page]

Skip to content

Commit 785e2bd

Browse files
committed
Update FreeType to 2.13.3
1 parent 0b9ab51 commit 785e2bd

File tree

15 files changed

+71
-1903
lines changed

15 files changed

+71
-1903
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
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.15.0
3232
hooks:

extern/meson.build

Lines changed: 11 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8158,7 +8158,7 @@ def test_normal_axes():
81588158
]
81598159
for nn, b in enumerate(bbaxis):
81608160
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
8161-
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
8161+
assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=0)
81628162

81638163
target = [
81648164
[150.0, 119.999, 930.0, 11.111],
@@ -8176,7 +8176,7 @@ def test_normal_axes():
81768176

81778177
target = [86.89, 76.89, 1019.11, 1015.61]
81788178
targetbb = mtransforms.Bbox.from_bounds(*target)
8179-
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
8179+
assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=0)
81808180

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

lib/matplotlib/tests/test_figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ def test_tightbbox():
814814
ax.set_xlim(0, 1)
815815
t = ax.text(1., 0.5, 'This dangles over end')
816816
renderer = fig.canvas.get_renderer()
817-
x1Nom0 = 8.9375 # inches
817+
x1Nom0 = 8.9875 # inches
818818
assert abs(t.get_tightbbox(renderer).x1 - x1Nom0 * fig.dpi) < 2
819819
assert abs(ax.get_tightbbox(renderer).x1 - x1Nom0 * fig.dpi) < 2
820820
assert abs(fig.get_tightbbox(renderer).x1 - x1Nom0) < 0.05

lib/matplotlib/tests/test_ft2font.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,10 +707,10 @@ def test_ft2font_get_sfnt_table(font_name, header):
707707

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

lib/matplotlib/tests/test_text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,8 @@ def test_wrap(x, rotation, halign):
711711
s = 'This is a very long text that should be wrapped multiple times.'
712712
text = subfig.text(x, 0.7, s, wrap=True, rotation=rotation, ha=halign)
713713
fig.canvas.draw()
714-
assert text._get_wrapped_text() == ('This is a very long text\n'
715-
'that should be\n'
714+
assert text._get_wrapped_text() == ('This is a very long\n'
715+
'text that should be\n'
716716
'wrapped multiple\n'
717717
'times.')
718718

subprojects/freetype-2.13.3.wrap

Lines changed: 13 additions & 0 deletions
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

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

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

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

0 commit comments

Comments
 (0)
0