[docs] encodings library (#1940)
Document the ``encodings.codecs`` part which might be useful to some people, and add a brief note about MacRoman.
This commit is contained in:
parent
842289c00e
commit
c89c9487f1
@ -1,10 +0,0 @@
|
||||
################
|
||||
StandardEncoding
|
||||
################
|
||||
|
||||
.. automodule:: fontTools.encodings.StandardEncoding
|
||||
:inherited-members:
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. data:: fontTools.encodings.StandardEncoding.StandardEncoding
|
@ -1,8 +0,0 @@
|
||||
######
|
||||
codecs
|
||||
######
|
||||
|
||||
.. automodule:: fontTools.encodings.codecs
|
||||
:inherited-members:
|
||||
:members:
|
||||
:undoc-members:
|
@ -1,17 +1,21 @@
|
||||
#########
|
||||
encodings
|
||||
#########
|
||||
##################################################
|
||||
encodings: Support for OpenType-specific encodings
|
||||
##################################################
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
fontTools includes support for some character encodings found in legacy Mac
|
||||
TrueType fonts. Many of these legacy encodings have found their way into the
|
||||
standard Python ``encodings`` library, but others still remain unimplemented.
|
||||
Importing ``fontTools.encodings.codecs`` will therefore add string ``encode``
|
||||
and ``decode`` support for the following encodings:
|
||||
|
||||
codecs
|
||||
macRoman
|
||||
StandardEncoding
|
||||
* ``x_mac_japanese_ttx``
|
||||
* ``x_mac_trad_chinese_ttx``
|
||||
* ``x_mac_korean_ttx``
|
||||
* ``x_mac_simp_chinese_ttx``
|
||||
|
||||
fontTools also includes a package (``fontTools.encodings.MacRoman``) which
|
||||
contains a mapping of glyph IDs to glyph names in the MacRoman character set::
|
||||
|
||||
.. automodule:: fontTools.encodings
|
||||
:inherited-members:
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
>>> from fontTools.encodings.MacRoman import MacRoman
|
||||
>>> MacRoman[26]
|
||||
'twosuperior'
|
||||
|
@ -1,10 +0,0 @@
|
||||
########
|
||||
MacRoman
|
||||
########
|
||||
|
||||
.. automodule:: fontTools.encodings.MacRoman
|
||||
:inherited-members:
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
.. data:: fontTools.encodings.MacRoman.MacRoman
|
Loading…
x
Reference in New Issue
Block a user