Skip to content

Commit 48153f6

Browse files
authored
Merge pull request #183 from dstansby/rm-smallcaps
Remove example of small-caps font
2 parents 0b77d03 + 1cfadae commit 48153f6

File tree

5 files changed

+6
-27
lines changed

5 files changed

+6
-27
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Beginner handout [(download pdf)](https://matplotlib.org/cheatsheets/handout-beg
2727
or https://github.com/adobe-fonts/source-sans-pro/tree/release/OTF
2828
* `fonts/source-serif-pro/*` : See https://fonts.google.com/specimen/Source+Serif+Pro
2929
or https://github.com/adobe-fonts/source-serif-pro/tree/release/OTF
30-
* `fonts/eb-garamond/*` : See https://bitbucket.org/georgd/eb-garamond/src/master
3130
* `fonts/pacifico/*` : See https://fonts.google.com/download?family=Pacifico
3231

3332
On Linux, with `make` installed, the fonts can be set up with the following command:

cheatsheets.tex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,6 @@
327327
{\faIcon{discourse}\,discourse.matplotlib.org}\\
328328
\href{https://stackoverflow.com/questions/tagged/matplotlib}
329329
{\faIcon{stack-overflow}\,stackoverflow.com/questions/tagged/matplotlib}\\
330-
\href{https://gitter.im/matplotlib/matplotlib}
331-
{\faIcon{gitter}\,{https://gitter.im/matplotlib/matplotlib}}\\
332330
\href{https://twitter.com/matplotlib}
333331
{\faIcon{twitter}\,twitter.com/matplotlib}\\
334332
\href{https://mail.python.org/mailman/listinfo/matplotlib-users}
@@ -522,7 +520,7 @@
522520
\scale{projection-3d.pdf}
523521
{p='3d'\hfill\api{https://matplotlib.org/stable/api/toolkits/mplot3d.html}}{}
524522
\plot{projection-cartopy.pdf}{p=ccrs.Orthographic()}
525-
{https://scitools.org.uk/cartopy/docs/latest/reference/projections.html}
523+
{https://cartopy.readthedocs.io/stable/reference/projections.html}
526524
{import cartopy.crs as ccrs}
527525
{}
528526
\end{myboxed}

check-links.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
status_codes = [pdfx.downloader.get_status_code(ref.ref) for ref in refs]
1212

1313
broken_links = [(ref.ref, code) for ref, code in zip(refs, status_codes) if code != 200]
14+
# It seems that Twitter and stackoverflow do not respond well to the link checker and throws a 400
15+
broken_links = [b for b in broken_links if not ('twitter.com' in b[0] or 'stackoverflow.com' in b[0])]
1416

15-
# it seems that Twitter does not respond well to the link checker and throws a 400
16-
if all(['twitter.com' in url for url, _ in broken_links]):
17+
if len(broken_links) == 0:
1718
sys.exit(0)
1819
else:
1920
print('Broken links:', broken_links)

fonts/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
FONT_DIRS := eb-garamond roboto roboto-mono roboto-slab source-code-pro source-sans-pro source-serif-pro pacifico
1+
FONT_DIRS := roboto roboto-mono roboto-slab source-code-pro source-sans-pro source-serif-pro pacifico
22

3-
EB_GARAMOND_ZIP := https://bitbucket.org/georgd/eb-garamond/downloads/EBGaramond-0.016.zip
43
ROBOTO_ZIP := https://github.com/googlefonts/roboto/releases/download/v2.138/roboto-unhinted.zip
54
ROBOTO_MONO_ZIP := https://github.com/googlefonts/RobotoMono/archive/8f651634e746da6df6c2c0be73255721d24f2372.zip
65
ROBOTO_SLAB_ZIP := https://github.com/googlefonts/robotoslab/archive/a65e6d00d8e3e7ee2fabef844e58fa12690384d2.zip
@@ -18,7 +17,6 @@ default: all
1817
.PHONY: all
1918
all: sources
2019
mkdir -p $(FONT_DIRS)
21-
cd eb-garamond && unzip -j /tmp/eb-garamond.zip "EBGaramond-0.016/otf/*.otf" $(UNZIP_FLAGS)
2220
cd roboto && unzip -j /tmp/roboto.zip "*.ttf" $(UNZIP_FLAGS)
2321
cd roboto-mono && unzip -j /tmp/roboto-mono.zip "RobotoMono-8f651634e746da6df6c2c0be73255721d24f2372/fonts/ttf/*.ttf" $(UNZIP_FLAGS)
2422
cd roboto-slab && unzip -j /tmp/roboto-slab.zip "robotoslab-a65e6d00d8e3e7ee2fabef844e58fa12690384d2/fonts/static/*.ttf" $(UNZIP_FLAGS)
@@ -29,7 +27,6 @@ all: sources
2927

3028
.PHONY: sources
3129
sources:
32-
wget $(EB_GARAMOND_ZIP) -O /tmp/eb-garamond.zip
3330
wget $(ROBOTO_ZIP) -O /tmp/roboto.zip
3431
wget $(ROBOTO_MONO_ZIP) -O /tmp/roboto-mono.zip
3532
wget $(ROBOTO_SLAB_ZIP) -O /tmp/roboto-slab.zip

scripts/fonts.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,10 @@
1111

1212
fig = plt.figure(figsize=(4.25, 3.8))
1313
ax = fig.add_axes([0, 0, 1, 1], frameon=False, xticks=[], yticks=[],
14-
xlim=[0, 40], ylim=[0, 38])
14+
xlim=[0, 40], ylim=[0, 34])
1515

1616
y = 1
1717

18-
# -----------------------------------------------------------------------------
19-
variants = {
20-
"normal" : "../fonts/eb-garamond/EBGaramond08-Regular.otf",
21-
"small-caps" : "../fonts/eb-garamond/EBGaramondSC08-Regular.otf"
22-
}
23-
24-
text = "The quick brown fox jumps over the lazy dog"
25-
for i, (variant, file) in enumerate(variants.items()):
26-
ax.text(1, y, text, size=9, va="center", font=pathlib.Path(file).resolve())
27-
28-
ax.text(39, y, variant,
29-
color="0.25", va="center", ha="right",
30-
size="small", family="Source Code Pro", weight=400)
31-
y += 1.65
32-
y += 1
33-
3418
# -----------------------------------------------------------------------------
3519
styles = ["normal", "italic"]
3620

0 commit comments

Comments
 (0)