We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d27272 commit 7301019Copy full SHA for 7301019
.pre-commit-config.yaml
@@ -20,13 +20,13 @@ repos:
20
- id: check-docstring-first
21
exclude: lib/matplotlib/typing.py # docstring used for attribute flagged by check
22
- id: end-of-file-fixer
23
- exclude_types: [svg]
+ exclude_types: [diff, svg]
24
- id: mixed-line-ending
25
- id: name-tests-test
26
args: ["--pytest-test-first"]
27
- id: no-commit-to-branch # Default is master and main.
28
- id: trailing-whitespace
29
30
- repo: https://github.com/pre-commit/mirrors-mypy
31
rev: v1.14.1
32
hooks:
extern/meson.build
@@ -13,11 +13,20 @@ else
13
# must match the value in `lib/matplotlib.__init__.py`. Also update the docs
14
# in `docs/devel/dependencies.rst`. Bump the cache key in
15
# `.circleci/config.yml` when changing requirements.
16
- LOCAL_FREETYPE_VERSION = '2.6.1'
+ LOCAL_FREETYPE_VERSION = '2.13.3'
17
18
freetype_proj = subproject(
19
f'freetype-@LOCAL_FREETYPE_VERSION@',
- default_options: ['default_library=static'])
+ default_options: [
+ 'default_library=static',
+ 'brotli=disabled',
+ 'bzip2=disabled',
+ 'harfbuzz=disabled',
+ 'mmap=auto',
+ 'png=disabled',
+ 'tests=disabled',
+ 'zlib=internal',
+ ])
freetype_dep = freetype_proj.get_variable('freetype_dep')
endif
lib/matplotlib/__init__.py
@@ -1317,7 +1317,7 @@ def _val_or_rc(val, rc_name):
1317
def _init_tests():
1318
# The version of FreeType to install locally for running the tests. This must match
1319
# the value in `meson.build`.
1320
1321
1322
from matplotlib import ft2font
1323
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
lib/matplotlib/tests/test_axes.py
@@ -8139,7 +8139,7 @@ def test_normal_axes():
8139
]
8140
for nn, b in enumerate(bbaxis):
8141
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
8142
- assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
+ assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=0)
8143
8144
target = [
8145
[150.0, 119.999, 930.0, 11.111],
@@ -8157,7 +8157,7 @@ def test_normal_axes():
8157
8158
target = [85.5138, 75.88888, 1021.11, 1017.11]
8159
targetbb = mtransforms.Bbox.from_bounds(*target)
8160
- assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
+ assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=0)
8161
8162
# test that get_position roundtrips to get_window_extent
8163
axbb = ax.get_position().transformed(fig.transFigure).bounds
lib/matplotlib/tests/test_ft2font.py
@@ -706,10 +706,10 @@ def test_ft2font_get_sfnt_table(font_name, header):
706
707
@pytest.mark.parametrize('left, right, unscaled, unfitted, default', [
708
# 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),
+ ('A', 'A', 57, 247, 256), ('A', 'À', 57, 247, 256), ('A', 'Á', 57, 247, 256),
+ ('A', 'Â', 57, 247, 256), ('A', 'Ã', 57, 247, 256), ('A', 'Ä', 57, 247, 256),
711
# And a few other random ones.
712
- ('D', 'A', -36, -156, -128), ('T', '.', -243, -1056, -1024),
+ ('D', 'A', -36, -156, -128), ('T', '.', -243, -1055, -1024),
713
('X', 'C', -149, -647, -640), ('-', 'J', 114, 495, 512),
714
])
715
def test_ft2font_get_kerning(left, right, unscaled, unfitted, default):
lib/matplotlib/tests/test_legend.py
@@ -469,10 +469,10 @@ def test_figure_legend_outside():
469
todos += ['left ' + pos for pos in ['lower', 'center', 'upper']]
470
todos += ['right ' + pos for pos in ['lower', 'center', 'upper']]
471
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]
+ upperext = [20.347556, 24.722556, 790.5205, 546.499]
+ lowerext = [20.347556, 68.056556, 790.5205, 589.833]
+ leftext = [151.681556, 24.722556, 790.5205, 589.833]
+ rightext = [20.347556, 24.722556, 659.1865, 589.833]
476
axbb = [upperext, upperext, upperext,
477
lowerext, lowerext, lowerext,
478
leftext, leftext, leftext,
lib/matplotlib/tests/test_polar.py
@@ -328,7 +328,7 @@ def test_get_tightbbox_polar():
328
fig.canvas.draw()
329
bb = ax.get_tightbbox(fig.canvas.get_renderer())
330
assert_allclose(
331
- bb.extents, [107.7778, 29.2778, 539.7847, 450.7222], rtol=1e-03)
+ bb.extents, [107.7153, 28.7778, 539.7847, 451.2222], rtol=1e-03)
332
333
334
@check_figures_equal()
subprojects/freetype-2.13.3.wrap
@@ -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
+freetype = freetype_dep
subprojects/freetype-2.6.1.wrap
subprojects/packagefiles/freetype-2.6.1-meson/LICENSE.build
0 commit comments