fonts

Using multiple font sizes in Plotly chart title (Python)

Using multiple font sizes in Plotly chart title (Python) Question: I have a chart title which spans multiple lines using line breaks. I’d like to have everything after the first line in a smaller font (effectively a subtitle), but can’t figure out a way to do this. Couldn’t see any similar question on here. import …

Total answers: 2

matplotlib: Can I use a secondary font for missing glyphs?

matplotlib: Can I use a secondary font for missing glyphs? Question: The font I want to use doesn’t have all the symbols I need. Is it possible to have matplotlib use a different font if a symbol is missing? Here is a minimal example: import matplotlib.pyplot as plt fig = plt.figure() plt.axis([0, 8, 0, 6]) …

Total answers: 1

Python Programmatically Change Console font size

Python Programmatically Change Console font size Question: I found the code below which is supposed to programmatically change the console font size. I’m on Windows 10. However, whatever values I tweak, I can’t seem to get any control over the font size, and also for some reason the console which gets opened when I run …

Total answers: 3

Python Windows Enum Installed Fonts

Python Windows Enum Installed Fonts Question: I am trying to get a list of installed fonts on Windows machines so that I can then install missing ones. I’m on Py3.*, Windows 7. Looking through the win API documentation I know that I need to use EnumFontFamiliesExW however I’m not sure what the correct syntax is …

Total answers: 1

How to set a Tkinter widget to a monospaced, platform independent font?

How to set a Tkinter widget to a monospaced, platform independent font? Question: It’s said here in the section Standard Fonts: Particularly for more-or-less standard user interface elements, each platform defines specific fonts that should be used. Tk encapsulates many of these into a standard set of fonts that are always available, and of course …

Total answers: 2

How can I configure matplotlib to be able to read fonts from a local path?

How can I configure matplotlib to be able to read fonts from a local path? Question: I would like to be able to place .ttf files in a local folder and have Matplotlib configured to look in that folder for fonts if it can’t find them in the normal system folders. This previous answer showed …

Total answers: 3

Matplotlib can't find font installed in my Linux machine

Matplotlib can't find font installed in my Linux machine Question: I am trying to draw an xkcd-style plot with matplotlib (ver. 1.4.2) under Python 3. When I try to run: import matplotlib.pyplot as plt plt.xkcd() plt.plot([1,2,3,4], [1,4,9,16], ‘bo’) plt.axis([0, 6, 0, 20]) plt.show() It opens an empty window without any image and I get the …

Total answers: 5

ReportLab: working with Chinese/Unicode characters

ReportLab: working with Chinese/Unicode characters Question: TL;DR: Is there some way of telling ReportLab to use a specific font, and fallback to another if glyphs for some characters are missing? Alternatively, Do you know of a condensed TrueType font which contains the glyphs for all European languages, Hebrew, Russian, Chinese, Japanese and Arabic? I’ve been …

Total answers: 3

How do I make sans serif superscript or subscript text in matplotlib?

How do I make sans serif superscript or subscript text in matplotlib? Question: I want to use a subscript in an axis label in a matplotlib figure. Using LaTeX I would set it as $N_i$, which gives me the italic serif font. I know I can get non-italic mathfont with mathrm. But I would like …

Total answers: 3