We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 782c51a commit 5a03776Copy full SHA for 5a03776
.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.15.0
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
@@ -1319,7 +1319,7 @@ def _val_or_rc(val, rc_name):
1319
def _init_tests():
1320
# The version of FreeType to install locally for running the tests. This must match
1321
# the value in `meson.build`.
1322
1323
1324
from matplotlib import ft2font
1325
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
lib/matplotlib/tests/test_axes.py
@@ -8158,7 +8158,7 @@ def test_normal_axes():
8158
]
8159
for nn, b in enumerate(bbaxis):
8160
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
8161
- assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
+ assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=0)
8162
8163
target = [
8164
[150.0, 119.999, 930.0, 11.111],
@@ -8176,7 +8176,7 @@ def test_normal_axes():
8176
8177
target = [86.89, 76.89, 1019.11, 1015.61]
8178
targetbb = mtransforms.Bbox.from_bounds(*target)
8179
- assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
+ assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=0)
8180
8181
# test that get_position roundtrips to get_window_extent
8182
axbb = ax.get_position().transformed(fig.transFigure).bounds
lib/matplotlib/tests/test_figure.py
@@ -814,7 +814,7 @@ def test_tightbbox():
814
ax.set_xlim(0, 1)
815
t = ax.text(1., 0.5, 'This dangles over end')
816
renderer = fig.canvas.get_renderer()
817
- x1Nom0 = 8.9375 # inches
+ x1Nom0 = 8.9875 # inches
818
assert abs(t.get_tightbbox(renderer).x1 - x1Nom0 * fig.dpi) < 2
819
assert abs(ax.get_tightbbox(renderer).x1 - x1Nom0 * fig.dpi) < 2
820
assert abs(fig.get_tightbbox(renderer).x1 - x1Nom0) < 0.05
lib/matplotlib/tests/test_ft2font.py
@@ -708,10 +708,10 @@ def test_ft2font_get_sfnt_table(font_name, header):
708
709
@pytest.mark.parametrize('left, right, unscaled, unfitted, default', [
710
# These are all the same class.
711
- ('A', 'A', 57, 248, 256), ('A', 'À', 57, 248, 256), ('A', 'Á', 57, 248, 256),
712
- ('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),
713
# And a few other random ones.
714
- ('D', 'A', -36, -156, -128), ('T', '.', -243, -1056, -1024),
+ ('D', 'A', -36, -156, -128), ('T', '.', -243, -1055, -1024),
715
('X', 'C', -149, -647, -640), ('-', 'J', 114, 495, 512),
716
])
717
def test_ft2font_get_kerning(left, right, unscaled, unfitted, default):
lib/matplotlib/tests/test_text.py
@@ -704,8 +704,8 @@ def test_wrap(x, rotation, halign):
704
s = 'This is a very long text that should be wrapped multiple times.'
705
text = subfig.text(x, 0.7, s, wrap=True, rotation=rotation, ha=halign)
706
fig.canvas.draw()
707
- assert text._get_wrapped_text() == ('This is a very long text\n'
- 'that should be\n'
+ assert text._get_wrapped_text() == ('This is a very long\n'
+ 'text that should be\n'
'wrapped multiple\n'
'times.')
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