Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9574b0a

Browse files
committed
replace Delicious font with EB Garamond
1 parent c3b4509 commit 9574b0a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

fonts/Makefile

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

3-
DELICIOUS_ZIP := http://www.exljbris.com/dl/DELICIOUS_21_OTF.zip
3+
EB_GARAMOND_ZIP := https://bitbucket.org/georgd/eb-garamond/downloads/EBGaramond-0.016.zip
44
ROBOTO_ZIP := https://github.com/googlefonts/roboto/releases/download/v2.138/roboto-unhinted.zip
55
ROBOTO_MONO_ZIP := https://github.com/googlefonts/RobotoMono/archive/8f651634e746da6df6c2c0be73255721d24f2372.zip
66
ROBOTO_SLAB_ZIP := https://github.com/googlefonts/robotoslab/archive/a65e6d00d8e3e7ee2fabef844e58fa12690384d2.zip
@@ -17,9 +17,7 @@ default: all
1717
.PHONY: all
1818
all: sources
1919
mkdir -p $(FONT_DIRS)
20-
cd delicious-123 && unzip -j /tmp/delicious.zip "DELICIOUS_21_OTF/*.otf" $(UNZIP_FLAGS)
21-
cd delicious-123 && ln -sf Delicious_R_2021.otf Delicious-Roman.otf
22-
cd delicious-123 && ln -sf Delicious_SC_2021.otf Delicious-SmallCaps.otf
20+
cd eb-garamond && unzip -j /tmp/eb-garamond.zip "EBGaramond-0.016/otf/*.otf" $(UNZIP_FLAGS)
2321
cd roboto && unzip -j /tmp/roboto.zip "*.ttf" $(UNZIP_FLAGS)
2422
cd roboto-mono && unzip -j /tmp/roboto-mono.zip "RobotoMono-8f651634e746da6df6c2c0be73255721d24f2372/fonts/ttf/*.ttf" $(UNZIP_FLAGS)
2523
cd roboto-slab && unzip -j /tmp/roboto-slab.zip "robotoslab-a65e6d00d8e3e7ee2fabef844e58fa12690384d2/fonts/static/*.ttf" $(UNZIP_FLAGS)
@@ -29,7 +27,7 @@ all: sources
2927

3028
.PHONY: sources
3129
sources:
32-
wget $(DELICIOUS_ZIP) -O /tmp/delicious.zip
30+
wget $(EB_GARAMOND_ZIP) -O /tmp/eb-garamond.zip
3331
wget $(ROBOTO_ZIP) -O /tmp/roboto.zip
3432
wget $(ROBOTO_MONO_ZIP) -O /tmp/roboto-mono.zip
3533
wget $(ROBOTO_SLAB_ZIP) -O /tmp/roboto-slab.zip

scripts/fonts.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
# Matplotlib cheat sheet
33
# Released under the BSD License
44
# -----------------------------------------------------------------------------
5+
import pathlib
6+
57
import matplotlib.pyplot as plt
6-
from matplotlib.font_manager import FontProperties
8+
79

810
fig = plt.figure(figsize=(4.25, 3.8))
911
ax = fig.add_axes([0,0,1,1], frameon=False, xticks=[], yticks=[],
@@ -13,14 +15,14 @@
1315

1416
# -----------------------------------------------------------------------------
1517
variants = {
16-
"normal" : "../fonts/delicious-123/Delicious-Roman.otf",
17-
"small-caps" : "../fonts/delicious-123/Delicious-SmallCaps.otf"
18+
"normal" : "../fonts/eb-garamond/EBGaramond08-Regular.otf",
19+
"small-caps" : "../fonts/eb-garamond/EBGaramondSC08-Regular.otf"
1820
}
1921

2022
text = "The quick brown fox jumps over the lazy dog"
2123
for i,variant in enumerate(variants.keys()):
2224
ax.text(1, y, text, size=9, va="center",
23-
fontproperties = FontProperties(fname=variants[variant]))
25+
font=pathlib.Path(variants[variant]).resolve())
2426

2527
ax.text(39, y, variant,
2628
color="0.25", va="center", ha="right",

0 commit comments

Comments
 (0)