SchemeDraw, python's library to draw many things, provides an option to configure global style using schemdraw.config(font="serif"). However, there is no mention of all the fonts supported nor how to add a custom font.
Is there a way to add a font using .ttf file in schemdraw?
Thank you !
SchemDraw uses matplotlib's fontfamily and the fonts installed in the system. In order to add a custom font using .ttf file, we have to add the font to matplotlib using its font_manager as shown below.
The above snippet caches the font and then the name of the font can be used in SchemDraw directly. For example,
schemdraw.config(font='custom')to config the font globally for the whole drawing.Thanks to Collin J. Delker for answering this on BitBucket. You can find the original answer here!