Popular recipes tagged "font" but not "wrap"http://code.activestate.com/recipes/tags/font-wrap/2017-04-10T01:07:11-07:00ActiveState Code Recipestkinter custom fonts (Python)
2017-04-10T01:07:11-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580778-tkinter-custom-fonts/
<p style="color: grey">
Python
recipe 580778
by <a href="/recipes/users/4189907/">Miguel Martínez López</a>
(<a href="/recipes/tags/font/">font</a>, <a href="/recipes/tags/tkinter/">tkinter</a>).
Revision 2.
</p>
<p>One Windows the best solution is to use the trick explained here:</p>
<p><a href="http://stackoverflow.com/a/30631309" rel="nofollow">http://stackoverflow.com/a/30631309</a></p>
<p>Another possibility is to use PIL. creating an image with the text and a specific font.</p>
<p>I provide 2 classes: <em>CustomFont_Label</em> and <em>CustomFont_Message</em>.</p>
<p><em>CustomFont_Message</em> displays multilines but requires the <em>width</em> parameter.</p>