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 8255ae2 commit 89c054dCopy full SHA for 89c054d
16 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
@@ -1329,7 +1329,7 @@ def _val_or_rc(val, *rc_names):
1329
def _init_tests():
1330
# The version of FreeType to install locally for running the tests. This must match
1331
# the value in `meson.build`.
1332
1333
1334
from matplotlib import ft2font
1335
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
lib/matplotlib/tests/test_bbox_tight.py
@@ -47,7 +47,7 @@ def test_bbox_inches_tight(text_placeholders):
47
48
@image_comparison(['bbox_inches_tight_suptile_legend'],
49
savefig_kwarg={'bbox_inches': 'tight'},
50
- tol=0 if platform.machine() == 'x86_64' else 0.02)
+ tol=0 if platform.machine() == 'x86_64' else 0.022)
51
def test_bbox_inches_tight_suptile_legend():
52
plt.plot(np.arange(10), label='a straight line')
53
plt.legend(bbox_to_anchor=(0.9, 1), loc='upper left')
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
@@ -1376,7 +1376,8 @@ def test_subfigure_dpi():
1376
1377
1378
@image_comparison(['test_subfigure_ss.png'], style='mpl20',
1379
- savefig_kwarg={'facecolor': 'teal'}, tol=0.02)
+ savefig_kwarg={'facecolor': 'teal'},
1380
+ tol=0.022)
1381
def test_subfigure_ss():
1382
# test assigning the subfigure via subplotspec
1383
np.random.seed(19680801)
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_mathtext.py
@@ -568,14 +568,14 @@ def test_box_repr():
568
_mathtext.DejaVuSansFonts(fm.FontProperties(), LoadFlags.NO_HINTING),
569
fontsize=12, dpi=100))
570
assert s == textwrap.dedent("""\
571
- Hlist<w=9.49 h=16.08 d=6.64 s=0.00>[
+ Hlist<w=9.51 h=15.81 d=6.57 s=0.00>[
572
Hlist<w=0.00 h=0.00 d=0.00 s=0.00>[],
573
574
575
- Vlist<w=7.40 h=22.72 d=0.00 s=6.64>[
576
- HCentered<w=7.40 h=8.67 d=0.00 s=0.00>[
+ Vlist<w=7.43 h=22.38 d=0.00 s=6.57>[
+ HCentered<w=7.43 h=8.51 d=0.00 s=0.00>[
577
Glue,
578
- Hlist<w=7.40 h=8.67 d=0.00 s=0.00>[
+ Hlist<w=7.43 h=8.51 d=0.00 s=0.00>[
579
`1`,
580
k2.36,
581
],
@@ -584,9 +584,9 @@ def test_box_repr():
584
Vbox,
585
Hrule,
586
587
- HCentered<w=7.40 h=8.84 d=0.00 s=0.00>[
+ HCentered<w=7.43 h=8.66 d=0.00 s=0.00>[
588
589
- Hlist<w=7.40 h=8.84 d=0.00 s=0.00>[
+ Hlist<w=7.43 h=8.66 d=0.00 s=0.00>[
590
`2`,
591
k2.02,
592
lib/matplotlib/tests/test_text.py
@@ -720,8 +720,8 @@ def test_wrap(x, rotation, halign):
720
s = 'This is a very long text that should be wrapped multiple times.'
721
text = subfig.text(x, 0.7, s, wrap=True, rotation=rotation, ha=halign)
722
fig.canvas.draw()
723
- assert text._get_wrapped_text() == ('This is a very long text\n'
724
- 'that should be\n'
+ assert text._get_wrapped_text() == ('This is a very long\n'
+ 'text that should be\n'
725
'wrapped multiple\n'
726
'times.')
727
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
0 commit comments