Thanks to visit codestin.com Credit goes to github.com
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 b8d482f commit f00d7bcCopy full SHA for f00d7bc
15 files changed
.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
@@ -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
@@ -8150,7 +8150,7 @@ def test_normal_axes():
8150
]
8151
for nn, b in enumerate(bbaxis):
8152
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
8153
- assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
+ assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=0)
8154
8155
target = [
8156
[150.0, 119.999, 930.0, 11.111],
@@ -8168,7 +8168,7 @@ def test_normal_axes():
8168
8169
target = [86.89, 76.89, 1019.11, 1015.61]
8170
targetbb = mtransforms.Bbox.from_bounds(*target)
8171
- assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
+ assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=0)
8172
8173
# test that get_position roundtrips to get_window_extent
8174
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
@@ -707,10 +707,10 @@ def test_ft2font_get_sfnt_table(font_name, header):
707
708
@pytest.mark.parametrize('left, right, unscaled, unfitted, default', [
709
# 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),
+ ('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),
712
# And a few other random ones.
713
- ('D', 'A', -36, -156, -128), ('T', '.', -243, -1056, -1024),
+ ('D', 'A', -36, -156, -128), ('T', '.', -243, -1055, -1024),
714
('X', 'C', -149, -647, -640), ('-', 'J', 114, 495, 512),
715
])
716
def test_ft2font_get_kerning(left, right, unscaled, unfitted, default):
lib/matplotlib/tests/test_text.py
@@ -711,8 +711,8 @@ def test_wrap(x, rotation, halign):
s = 'This is a very long text that should be wrapped multiple times.'
text = subfig.text(x, 0.7, s, wrap=True, rotation=rotation, ha=halign)
fig.canvas.draw()
- 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'
717
'times.')
718
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