Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ matrix:

install:
- pip install -q --use-mirrors nose python-dateutil $NUMPY pep8 pyparsing pillow
- sudo apt-get update && sudo apt-get -qq install inkscape libav-tools gdb
- sudo apt-get update && sudo apt-get -qq install inkscape libav-tools gdb ttf-wqy-zenhei
# We use --no-install-recommends to avoid pulling in additional large latex docs that we don't need
- if [[ $BUILD_DOCS == true ]]; then sudo apt-get install -qq --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz; fi
- if [[ $BUILD_DOCS == true ]]; then pip install sphinx numpydoc linkchecker; fi
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/font_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def get_fontext_synonyms(fontext):
Return a list of file extensions extensions that are synonyms for
the given file extension *fileext*.
"""
return {'ttf': ('ttf', 'otf'),
return {'ttf': ('ttf', 'ttc', 'otf'),
'otf': ('ttf', 'otf'),
'afm': ('afm',)}[fontext]

Expand Down
11 changes: 11 additions & 0 deletions lib/matplotlib/tests/test_font_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,14 @@ def test_font_priority():
font = findfont(
FontProperties(family=["sans-serif"]))
assert_equal(os.path.basename(font), 'cmmi10.ttf')


def test_font_ttc():
# the font should be available(ttf-wqy-zenhei in ubuntu)
font = findfont(
FontProperties(family=["WenQuanYi Zen Hei"]))
assert_equal(os.path.basename(font), 'wqy-zenhei.ttc')

if __name__ == '__main__':
import nose
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy