Skip to content

Update FreeType to 2.13.3 #29816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: text-overhaul
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ repos:
- id: check-docstring-first
exclude: lib/matplotlib/typing.py # docstring used for attribute flagged by check
- id: end-of-file-fixer
exclude_types: [svg]
exclude_types: [diff, svg]
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
- id: no-commit-to-branch # Default is master and main.
- id: trailing-whitespace
exclude_types: [svg]
exclude_types: [diff, svg]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
Expand Down
13 changes: 11 additions & 2 deletions extern/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ else
# must match the value in `lib/matplotlib.__init__.py`. Also update the docs
# in `docs/devel/dependencies.rst`. Bump the cache key in
# `.circleci/config.yml` when changing requirements.
LOCAL_FREETYPE_VERSION = '2.6.1'
LOCAL_FREETYPE_VERSION = '2.13.3'

freetype_proj = subproject(
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

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ def _val_or_rc(val, rc_name):
def _init_tests():
# The version of FreeType to install locally for running the tests. This must match
# the value in `meson.build`.
LOCAL_FREETYPE_VERSION = '2.6.1'
LOCAL_FREETYPE_VERSION = '2.13.3'

from matplotlib import ft2font
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/mpl-data/matplotlibrc
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@
## ("native" is a synonym.)
## - force_autohint: Use FreeType's auto-hinter. ("auto" is a synonym.)
## - no_hinting: Disable hinting. ("none" is a synonym.)
#text.hinting: force_autohint
#text.hinting: default

#text.hinting_factor: 8 # Specifies the amount of softness for hinting in the
#text.hinting_factor: 1 # Specifies the amount of softness for hinting in the
# horizontal direction. A value of 1 will hint to full
# pixels. A value of 2 will hint to half pixels etc.
#text.kerning_factor: 0 # Specifies the scaling factor for kerning values. This
Expand Down
5 changes: 3 additions & 2 deletions lib/matplotlib/mpl-data/stylelib/_classic_test_patch.mplstyle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# This patch should go on top of the "classic" style and exists solely to avoid
# changing baseline images.

text.kerning_factor : 6

ytick.alignment: center_baseline

hatch.color: edge

text.hinting: default
text.hinting_factor: 1
8 changes: 6 additions & 2 deletions lib/matplotlib/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@

def set_font_settings_for_testing():
mpl.rcParams['font.family'] = 'DejaVu Sans'
mpl.rcParams['text.hinting'] = 'none'
mpl.rcParams['text.hinting_factor'] = 8
if getattr(mpl, '_called_from_pytest', False):
mpl.rcParams['text.hinting'] = 'default'
mpl.rcParams['text.hinting_factor'] = 1
else:
mpl.rcParams['text.hinting'] = 'none'
mpl.rcParams['text.hinting_factor'] = 8

Check warning on line 27 in lib/matplotlib/testing/__init__.py

View check run for this annotation

Codecov / codecov/patch

lib/matplotlib/testing/__init__.py#L26-L27

Added lines #L26 - L27 were not covered by tests


def set_reproducibility_for_testing():
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_artist/default_edges.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/barh_tick_label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/boxplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/bxp_baseline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/bxp_rangewhis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/canonical.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/extent_units.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/fill_units.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hexbin_log.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hist_density.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hist_offset.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hist_step_horiz.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/hlines_basic.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/imshow_clip.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/markevery.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/offset_points.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/pie_ccw_true.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/pie_default.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/pie_no_label.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/rc_grid.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/rc_markerfill.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/rc_spines.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/secondary_xy.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/single_point.png
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/vlines_basic.png
Binary file modified lib/matplotlib/tests/baseline_images/test_backend_pdf/kerning.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading