264 lines
20 KiB
HTML
264 lines
20 KiB
HTML
|
||
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
<html><head><title>Python: package fontTools.ttLib</title>
|
||
</head><body bgcolor="#f0f0f8">
|
||
|
||
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
||
<tr bgcolor="#7799ee">
|
||
<td valign=bottom> <br>
|
||
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="fontTools.html"><font color="#ffffff">fontTools</font></a>.ttLib</strong></big></big></font></td
|
||
><td align=right valign=bottom
|
||
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/code/fontTools/Lib/fontTools/ttLib/__init__.py">/code/fontTools/Lib/fontTools/ttLib/__init__.py</a></font></td></tr></table>
|
||
<p><tt>fontTools.ttLib -- a package for dealing with TrueType fonts.<br>
|
||
<br>
|
||
This package offers translators to convert TrueType fonts to Python <br>
|
||
objects and vice versa, and additionally from Python to TTX (an XML-based<br>
|
||
text format) and vice versa.<br>
|
||
<br>
|
||
Example interactive session:<br>
|
||
<br>
|
||
Python 1.5.2c1 (#43, Mar 9 1999, 13:06:43) [CW PPC w/GUSI w/MSL]<br>
|
||
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam<br>
|
||
>>> from fontTools import ttLib<br>
|
||
>>> tt = ttLib.<a href="#TTFont">TTFont</a>("afont.ttf")<br>
|
||
>>> tt['maxp'].numGlyphs<br>
|
||
242<br>
|
||
>>> tt['OS/2'].achVendID<br>
|
||
'B&H |