本文簡要介紹 python 語言中 matplotlib.dviread.PsfontsMap
的用法。
-
基礎:
object
psfonts.map 格式化文件,將 TeX 字體映射到 PS 字體。
- 參數:
- filename str 或 path-like
注意
由於曆史原因,TeX 知道許多 Type-1 字體的名稱與外界不同。 (一方麵,名稱必須適合八個字符。)此外,TeX 的原生字體不是 Type-1 而是 Metafont,除了作為位圖之外,轉換為 PostScript 是非常重要的。雖然存在到 Type-1 格式的高質量轉換並且隨現代 TeX 發行版一起提供,但我們需要知道哪些 Type-1 字體與哪些本機字體對應。由於這些原因,需要從內部字體名稱到字體文件名稱的映射。
texmf 樹通常包括映射文件,例如稱為
psfonts.map
、pdftex.map
或dvipdfm.map
。文件psfonts.map
由 dvips 使用,pdftex.map
由 pdfTeX 使用,dvipdfm.map
由 dvipdfm 使用。psfonts.map
可能會避免嵌入 35 種 PostScript 字體(即,它們沒有文件名,如上麵的 Times-Bold 示例所示),而 pdf-related 文件可能隻避免使用“Base 14”pdf 字體。但是用戶可能對這些文件進行了不同的配置。例子
>>> map = PsfontsMap(find_tex_file('pdftex.map')) >>> entry = map[b'ptmbo8r'] >>> entry.texname b'ptmbo8r' >>> entry.psname b'Times-Bold' >>> entry.encoding '/usr/local/texlive/2008/texmf-dist/fonts/enc/dvips/base/8r.enc' >>> entry.effects {'slant': 0.16700000000000001} >>> entry.filename
用法
class matplotlib.dviread.PsfontsMap(filename)
相關用法
- Python matplotlib PolyQuadMesh.set_hatch用法及代碼示例
- Python matplotlib PolyCollection.sticky_edges用法及代碼示例
- Python matplotlib PathCollection.set_hatch用法及代碼示例
- Python matplotlib PatchCollection.sticky_edges用法及代碼示例
- Python matplotlib PolyCollection.set_hatch用法及代碼示例
- Python matplotlib PatchCollection.set_hatch用法及代碼示例
- Python matplotlib PdfPages用法及代碼示例
- Python matplotlib PolyQuadMesh用法及代碼示例
- Python matplotlib PathCollection.legend_elements用法及代碼示例
- Python matplotlib PolyQuadMesh.sticky_edges用法及代碼示例
- Python matplotlib PathCollection.sticky_edges用法及代碼示例
- Python matplotlib Patch.set_hatch用法及代碼示例
- Python matplotlib Patch.contains_point用法及代碼示例
- Python matplotlib PickEvent用法及代碼示例
- Python matplotlib axvspan用法及代碼示例
- Python matplotlib Axes.get_legend_handles_labels用法及代碼示例
- Python matplotlib AbstractMovieWriter用法及代碼示例
- Python matplotlib triplot用法及代碼示例
- Python matplotlib StarPolygonCollection.set_hatch用法及代碼示例
- Python matplotlib Axes.hist用法及代碼示例
- Python matplotlib boxplot用法及代碼示例
- Python matplotlib subplots用法及代碼示例
- Python matplotlib InsetPosition用法及代碼示例
- Python matplotlib ToolManager.toolmanager_disconnect用法及代碼示例
- Python matplotlib Figure.set_size_inches用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.dviread.PsfontsMap。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。