File: index.rst

package info (click to toggle)
fonttools 4.61.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,588 kB
  • sloc: python: 145,091; xml: 103; makefile: 24
file content (71 lines) | stat: -rw-r--r-- 1,979 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#############################################
feaLib: Read and write OpenType feature files
#############################################

.. currentmodule:: fontTools.feaLib

.. contents:: On this page:
    :local:

       
.. rubric:: Overview
   :heading-level: 2

fontTools' :mod:`.feaLib` allows for the creation and parsing of Adobe
Font Development Kit for OpenType feature (``.fea``) files. The syntax
of these files is described `here <https://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html>`_.

``.fea`` files are primarily used for writing human-readable
definitions for the OpenType features stored in a font's ``GSUB`` and
``GPOS`` tables.

Supporting modules
------------------

feaLib contains modules for parsing and inspecting ``.fea`` files
as well as utilities for converting ``.fea`` rules into ``GSUB`` and
``GPOS`` tables and inserting them into fonts.
		   
 .. toctree::
    :maxdepth: 1

    parser
    ast

The :class:`fontTools.feaLib.parser.Parser` class can be used to parse files
into an abstract syntax tree, and from there the
:class:`fontTools.feaLib.builder.Builder` class can add features to an existing
font file. You can inspect the parsed syntax tree, walk the tree and do clever
things with it, and also generate your own feature files programmatically, by
using the classes in the :mod:`fontTools.feaLib.ast` module.



fontTools.feaLib.builder
------------------------

.. currentmodule:: fontTools.feaLib.builder

.. automodule:: fontTools.feaLib.builder
   :members: addOpenTypeFeatures, addOpenTypeFeaturesFromString, Builder
   :undoc-members:


fontTools.feaLib.lookupDebugInfo
--------------------------------

.. currentmodule:: fontTools.feaLib.lookupDebugInfo

.. automodule:: fontTools.feaLib.lookupDebugInfo
   :members:
   :undoc-members:


fontTools.feaLib.error
----------------------

.. currentmodule:: fontTools.feaLib.error

.. automodule:: fontTools.feaLib.error
   :members:
   :undoc-members: