diff --git a/.circleci/config.yml b/.circleci/config.yml index e8c8c2fca394..2f79a6fbba5c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,7 +49,6 @@ commands: ffmpeg \ fonts-crosextra-carlito \ fonts-freefont-otf \ - fonts-humor-sans \ fonts-noto-cjk \ fonts-wqy-zenhei \ graphviz \ @@ -67,15 +66,16 @@ commands: fonts-install: steps: - restore_cache: - key: fonts-2 + key: fonts-4 - run: name: Install custom fonts command: | mkdir -p ~/.local/share/fonts wget -nc https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O ~/.local/share/fonts/Felipa-Regular.ttf || true + wget -nc https://github.com/ipython/xkcd-font/blob/master/xkcd-script/font/xkcd-script.ttf?raw=true -O ~/.local/share/fonts/xkcd-Script.ttf || true fc-cache -f -v - save_cache: - key: fonts-2 + key: fonts-4 paths: - ~/.local/share/fonts/ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 814c066c43b1..ddec2754d03a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,7 +7,7 @@ "features": { "ghcr.io/devcontainers/features/desktop-lite:1": {}, "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { - "packages": "inkscape,ffmpeg,dvipng,lmodern,cm-super,texlive-latex-base,texlive-latex-extra,texlive-fonts-recommended,texlive-latex-recommended,texlive-pictures,texlive-xetex,fonts-wqy-zenhei,graphviz,fonts-crosextra-carlito,fonts-freefont-otf,fonts-humor-sans,fonts-noto-cjk,optipng" + "packages": "inkscape,ffmpeg,dvipng,lmodern,cm-super,texlive-latex-base,texlive-latex-extra,texlive-fonts-recommended,texlive-latex-recommended,texlive-pictures,texlive-xetex,fonts-wqy-zenhei,graphviz,fonts-crosextra-carlito,fonts-freefont-otf,fonts-comic-neue,fonts-noto-cjk,optipng" } }, "onCreateCommand": ".devcontainer/setup.sh", diff --git a/doc/devel/dependencies.rst b/doc/devel/dependencies.rst index 458fff51b82f..c0e761d6beb6 100644 --- a/doc/devel/dependencies.rst +++ b/doc/devel/dependencies.rst @@ -419,6 +419,5 @@ Optional * `Inkscape `_ * `optipng `_ -* the font "Humor Sans" (aka the "XKCD" font), or the free alternative - `Comic Neue `_ +* the font `xkcd script `_ or `Comic Neue `_ * the font "Times New Roman" diff --git a/lib/matplotlib/mpl-data/matplotlibrc b/lib/matplotlib/mpl-data/matplotlibrc index 9bd8a622092e..301afc38456b 100644 --- a/lib/matplotlib/mpl-data/matplotlibrc +++ b/lib/matplotlib/mpl-data/matplotlibrc @@ -269,7 +269,7 @@ #font.serif: DejaVu Serif, Bitstream Vera Serif, Computer Modern Roman, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif #font.sans-serif: DejaVu Sans, Bitstream Vera Sans, Computer Modern Sans Serif, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif #font.cursive: Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, Comic Neue, Comic Sans MS, cursive -#font.fantasy: Chicago, Charcoal, Impact, Western, Humor Sans, xkcd, fantasy +#font.fantasy: Chicago, Charcoal, Impact, Western, xkcd script, fantasy #font.monospace: DejaVu Sans Mono, Bitstream Vera Sans Mono, Computer Modern Typewriter, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace diff --git a/lib/matplotlib/mpl-data/stylelib/classic.mplstyle b/lib/matplotlib/mpl-data/stylelib/classic.mplstyle index 8923ce6f0497..976ab291907b 100644 --- a/lib/matplotlib/mpl-data/stylelib/classic.mplstyle +++ b/lib/matplotlib/mpl-data/stylelib/classic.mplstyle @@ -91,7 +91,7 @@ font.size : 12.0 font.serif : DejaVu Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif font.sans-serif: DejaVu Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, cursive -font.fantasy : Comic Sans MS, Chicago, Charcoal, ImpactWestern, Humor Sans, fantasy +font.fantasy : Comic Sans MS, Chicago, Charcoal, ImpactWestern, xkcd script, fantasy font.monospace : DejaVu Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace ### TEXT diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index 70ebd69cddb5..ddbb6cb36728 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -706,11 +706,12 @@ def xkcd( scale: float = 1, length: float = 100, randomness: float = 2 ) -> ExitStack: """ - Turn on `xkcd `_ sketch-style drawing mode. This will - only have effect on things drawn after this function is called. + Turn on `xkcd `_ sketch-style drawing mode. - For best results, the "Humor Sans" font should be installed: it is - not included with Matplotlib. + This will only have an effect on things drawn after this function is called. + + For best results, install the `xkcd script `_ + font; xkcd fonts are not packaged with Matplotlib. Parameters ---------- @@ -749,8 +750,7 @@ def xkcd( from matplotlib import patheffects rcParams.update({ - 'font.family': ['xkcd', 'xkcd Script', 'Humor Sans', 'Comic Neue', - 'Comic Sans MS'], + 'font.family': ['xkcd', 'xkcd Script', 'Comic Neue', 'Comic Sans MS'], 'font.size': 14.0, 'path.sketch': (scale, length, randomness), 'path.effects': [ diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 799bf5ddd774..dffbb2377a23 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -8848,7 +8848,7 @@ def test_tick_param_labelfont(): fig, ax = plt.subplots() ax.plot([1, 2, 3, 4], [1, 2, 3, 4]) ax.set_xlabel('X label in Impact font', fontname='Impact') - ax.set_ylabel('Y label in Humor Sans', fontname='Humor Sans') + ax.set_ylabel('Y label in xkcd script', fontname='xkcd script') ax.tick_params(color='r', labelfontfamily='monospace') plt.title('Title in sans-serif') for text in ax.get_xticklabels(): diff --git a/lib/matplotlib/textpath.py b/lib/matplotlib/textpath.py index de97899f8a72..c00966d6e6c3 100644 --- a/lib/matplotlib/textpath.py +++ b/lib/matplotlib/textpath.py @@ -99,7 +99,7 @@ def get_text_path(self, prop, s, ismath=False): from matplotlib.text import TextToPath from matplotlib.font_manager import FontProperties - fp = FontProperties(family="Humor Sans", style="italic") + fp = FontProperties(family="Comic Neue", style="italic") verts, codes = TextToPath().get_text_path(fp, "ABC") path = Path(verts, codes, closed=False) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy