當前位置: 首頁>>代碼示例>>Python>>正文


Python dviread.find_tex_file方法代碼示例

本文整理匯總了Python中matplotlib.dviread.find_tex_file方法的典型用法代碼示例。如果您正苦於以下問題:Python dviread.find_tex_file方法的具體用法?Python dviread.find_tex_file怎麽用?Python dviread.find_tex_file使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在matplotlib.dviread的用法示例。


在下文中一共展示了dviread.find_tex_file方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _get_adobe_standard_encoding

# 需要導入模塊: from matplotlib import dviread [as 別名]
# 或者: from matplotlib.dviread import find_tex_file [as 別名]
def _get_adobe_standard_encoding(self):
        enc_name = dviread.find_tex_file('8a.enc')
        enc = dviread.Encoding(enc_name)
        return dict([(c, i) for i, c in enumerate(enc.encoding)]) 
開發者ID:ktraunmueller,項目名稱:Computable,代碼行數:6,代碼來源:textpath.py

示例2: setup

# 需要導入模塊: from matplotlib import dviread [as 別名]
# 或者: from matplotlib.dviread import find_tex_file [as 別名]
def setup():
    dr.find_tex_file = lambda x: x 
開發者ID:miloharper,項目名稱:neural-network-animation,代碼行數:4,代碼來源:test_dviread.py

示例3: teardown

# 需要導入模塊: from matplotlib import dviread [as 別名]
# 或者: from matplotlib.dviread import find_tex_file [as 別名]
def teardown():
    dr.find_tex_file = original_find_tex_file 
開發者ID:miloharper,項目名稱:neural-network-animation,代碼行數:4,代碼來源:test_dviread.py

示例4: _get_adobe_standard_encoding

# 需要導入模塊: from matplotlib import dviread [as 別名]
# 或者: from matplotlib.dviread import find_tex_file [as 別名]
def _get_adobe_standard_encoding():
    enc_name = dviread.find_tex_file('8a.enc')
    enc = dviread.Encoding(enc_name)
    return {c: i for i, c in enumerate(enc.encoding)} 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:6,代碼來源:textpath.py

示例5: tex_font_map

# 需要導入模塊: from matplotlib import dviread [as 別名]
# 或者: from matplotlib.dviread import find_tex_file [as 別名]
def tex_font_map(self):
        return dviread.PsfontsMap(dviread.find_tex_file('pdftex.map')) 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:4,代碼來源:textpath.py

示例6: _get_ps_font_and_encoding

# 需要導入模塊: from matplotlib import dviread [as 別名]
# 或者: from matplotlib.dviread import find_tex_file [as 別名]
def _get_ps_font_and_encoding(texname):
        tex_font_map = dviread.PsfontsMap(dviread.find_tex_file('pdftex.map'))
        font_bunch = tex_font_map[texname]
        if font_bunch.filename is None:
            raise ValueError(
                ("No usable font file found for %s (%s). "
                    "The font may lack a Type-1 version.")
                % (font_bunch.psname, texname))

        font = get_font(font_bunch.filename)

        for charmap_name, charmap_code in [("ADOBE_CUSTOM", 1094992451),
                                           ("ADOBE_STANDARD", 1094995778)]:
            try:
                font.select_charmap(charmap_code)
            except (ValueError, RuntimeError):
                pass
            else:
                break
        else:
            charmap_name = ""
            warnings.warn("No supported encoding in font (%s)." %
                          font_bunch.filename)

        if charmap_name == "ADOBE_STANDARD" and font_bunch.encoding:
            enc0 = dviread.Encoding(font_bunch.encoding)
            enc = {i: _get_adobe_standard_encoding().get(c, None)
                   for i, c in enumerate(enc0.encoding)}
        else:
            enc = {}

        return font, enc 
開發者ID:Relph1119,項目名稱:GraphicDesignPatternByPython,代碼行數:34,代碼來源:textpath.py

示例7: texFontMap

# 需要導入模塊: from matplotlib import dviread [as 別名]
# 或者: from matplotlib.dviread import find_tex_file [as 別名]
def texFontMap(self):
        # lazy-load texFontMap, it takes a while to parse
        # and usetex is a relatively rare use case
        if self._texFontMap is None:
            self._texFontMap = dviread.PsfontsMap(
                dviread.find_tex_file('pdftex.map'))

        return self._texFontMap 
開發者ID:alvarobartt,項目名稱:twitter-stock-recommendation,代碼行數:10,代碼來源:backend_pdf.py

示例8: _get_adobe_standard_encoding

# 需要導入模塊: from matplotlib import dviread [as 別名]
# 或者: from matplotlib.dviread import find_tex_file [as 別名]
def _get_adobe_standard_encoding(self):
        enc_name = dviread.find_tex_file('8a.enc')
        enc = dviread.Encoding(enc_name)
        return {c: i for i, c in enumerate(enc.encoding)} 
開發者ID:alvarobartt,項目名稱:twitter-stock-recommendation,代碼行數:6,代碼來源:textpath.py


注:本文中的matplotlib.dviread.find_tex_file方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。