Skip to content

Commit 59bbffc

Browse files
committed
DOC: Add what's new note for TTC loading
1 parent f74ee0b commit 59bbffc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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.

0 commit comments

Comments
 (0)