Skip to content

Commit 51fa342

Browse files
authored
print available fonts
1 parent 5bae864 commit 51fa342

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

examples/text_labels_and_annotations/font_family_rc.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,14 @@ def print_text(text):
7171
plt.rcParams["font.family"] = "monospace"
7272
plt.rcParams["font.monospace"] = ["Menlo"]
7373
print_text("Hello World! 05")
74+
75+
76+
77+
#############################################################################
78+
#
79+
# Print all available fonts:
80+
81+
import matplotlib.font_manager
82+
list_of_fonts = matplotlib.font_manager.findSystemFonts(fontpaths=None, fontext='ttf')
83+
for l in list_of_fonts:
84+
print(l)

0 commit comments

Comments
 (0)