MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / get_fontawesome

Function get_fontawesome

tools/make_icons.py:27–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26
27def get_fontawesome():
28 cached_path = Path(mpl.get_cachedir(), "FontAwesome.otf")
29 if not cached_path.exists():
30 with urllib.request.urlopen(
31 "https://github.com/FortAwesome/Font-Awesome"
32 "/archive/v4.7.0.tar.gz") as req, \
33 tarfile.open(fileobj=BytesIO(req.read()), mode="r:gz") as tf:
34 cached_path.write_bytes(tf.extractfile(tf.getmember(
35 "Font-Awesome-4.7.0/fonts/FontAwesome.otf")).read())
36 return cached_path
37
38
39def save_icon(fig, dest_dir, name, add_black_fg_color):

Callers 1

make_iconsFunction · 0.85

Calls 2

PathClass · 0.85
openMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…