8000 add support for ttc font files by luoq · Pull Request #3912 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

add support for ttc font files #3912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
test ttc font loading using wqy-zenhei.ttc
  • Loading branch information
Qiang Luo committed Dec 12, 2014
commit 3b078d2ad0a62bb1cd85e2c31bbf787da34a34af
10 changes: 10 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,13 @@ 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)
0