File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
doc/release/next_whats_new Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ Fonts addressable by all their SFNT family names
2+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+ Fonts can now be selected by any of the family names they advertise in
5+ the OpenType name table, not just the one FreeType reports as the primary
6+ family name.
7+
8+ Some fonts store different family names on different platforms or in
9+ different name-table entries. For example, Ubuntu Light stores
10+ ``"Ubuntu" `` in the Macintosh-platform Name ID 1 slot (which FreeType
11+ uses as the primary name) and ``"Ubuntu Light" `` in the Microsoft-platform
12+ Name ID 1 slot. Previously only the FreeType-derived name was registered,
13+ requiring an obscure weight-based workaround::
14+
15+ # Previously required
16+ matplotlib.rcParams['font.family'] = 'Ubuntu'
17+ matplotlib.rcParams['font.weight'] = 300
18+
19+ All name-table entries that describe a family — Name ID 1 on both
20+ platforms, the Typographic Family (Name ID 16), and the WWS Family
21+ (Name ID 21) — are now registered as separate entries in the
22+ `~matplotlib.font_manager.FontManager `, so any of those names can be
23+ used directly::
24+
25+ matplotlib.rcParams['font.family'] = 'Ubuntu Light'
You can’t perform that action at this time.
0 commit comments