Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Please add support for ttc font files (PDF/PS output) #3135

Copy link
Copy link
Open
@mjanikas

Description

@mjanikas
Issue body actions

The code posted below will return the following: RuntimeError: TrueType font is missing table . It looks like TTC files have replaced TTF files for many fonts in Windows 8. Please consider adding support. Thanks so much,

MJ

import matplotlib.pyplot as PLT
import pylab as PYLAB
from matplotlib.backends.backend_pdf import PdfPages as PDF
import matplotlib.font_manager as fm

fontFile = r'C:\Windows\Fonts\msyh.ttc'
fp1 = fm.FontProperties(fname=fontFile)

reportFile = r'C:\Temp\TestUnicodeJA.pdf'
pdfOutput = PDF(reportFile)
vals = range(100)

PLT.plot(vals, vals, color = "r", linestyle = "-")
mess = u'\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059....'
PYLAB.xlabel(mess, fontproperties = fp1)
PLT.savefig(pdfOutput, format='pdf')
PLT.close()
pdfOutput.close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: text/fonts

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.