Created
July 10, 2018 03:37
-
-
Save jsoma/424fa5ae1c3b3d462793538bd83de81d to your computer and use it in GitHub Desktop.
See all of the fonts that matplotlib can access
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.font_manager | |
from IPython.core.display import HTML | |
def make_html(fontname): | |
return "<p>{font}: <span style='font-family:{font}; font-size: 24px;'>{font}</p>".format(font=fontname) | |
code = "\n".join([make_html(font) for font in sorted(set([f.name for f in matplotlib.font_manager.fontManager.ttflist]))]) | |
HTML("<div style='column-count: 2;'>{}</div>".format(code)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment