File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
doc/release/next_whats_new Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ Support for loading TrueType Collection fonts
2+ ---------------------------------------------
3+
4+ TrueType Collection fonts (commonly found as files with a ``.ttc `` extension) are now
5+ supported. Namely, Matplotlib will include these file extensions in its scan for system
6+ fonts, and will add all sub-fonts to its list of available fonts (i.e., the list from
7+ `~.font_manager.get_font_names `).
8+
9+ From most high-level API, this means you should be able to specify the name of any
10+ sub-font in a collection just as you would any other font. Note that at this time, there
11+ is no way to specify the entire collection with any sort of automated selection of the
12+ internal sub-fonts.
13+
14+ In the low-level API, to ensure backwards-compatibility while facilitating this new
15+ support, a `.FontPath ` instance (comprised of a font path and a sub-font index, with
16+ behaviour similar to a `str `) may be passed to the font management API in place of a
17+ simple `os.PathLike ` path. Any font management API that previously returned a string path
18+ now returns a `.FontPath ` instance instead.
You can’t perform that action at this time.
0 commit comments