2020-06-15 11:56:46 +01:00
#################################################
otlLib: Routines for working with OpenType Layout
#################################################
2018-10-10 21:02:13 -04:00
2020-06-15 11:56:46 +01:00
The `` fontTools.otlLib `` library provides routines to help you create the
subtables and other data structures you need when you are editing a font's
`` GSUB `` and `` GPOS `` tables: substitution and positioning rules, anchors,
lookups, coverage tables and so on.
2018-10-10 21:02:13 -04:00
2020-06-15 11:56:46 +01:00
------------------------------------------
High-level OpenType Layout Lookup Builders
------------------------------------------
2018-10-10 21:02:13 -04:00
2021-12-02 15:31:49 +00:00
.. currentmodule :: fontTools.otlLib.builder
.. autoclass :: AlternateSubstBuilder
.. autoclass :: ChainContextPosBuilder
.. autoclass :: ChainContextSubstBuilder
.. autoclass :: LigatureSubstBuilder
.. autoclass :: MultipleSubstBuilder
.. autoclass :: CursivePosBuilder
.. autoclass :: MarkBasePosBuilder
.. autoclass :: MarkLigPosBuilder
.. autoclass :: MarkMarkPosBuilder
.. autoclass :: ReverseChainSingleSubstBuilder
.. autoclass :: SingleSubstBuilder
.. autoclass :: ClassPairPosSubtableBuilder
.. autoclass :: PairPosBuilder
.. autoclass :: SinglePosBuilder
2020-06-15 11:56:46 +01:00
--------------------------------------
Common OpenType Layout Data Structures
--------------------------------------
2021-12-02 15:31:49 +00:00
.. currentmodule :: fontTools.otlLib.builder
.. autofunction :: buildCoverage
.. autofunction :: buildLookup
2020-06-15 11:56:46 +01:00
------------------------------------
Low-level GSUB Table Lookup Builders
------------------------------------
These functions deal with the "simple" lookup types. See above for classes to
help build more complex lookups (contextual and chaining lookups).
2021-12-02 15:31:49 +00:00
.. currentmodule :: fontTools.otlLib.builder
.. autofunction :: buildSingleSubstSubtable
.. autofunction :: buildMultipleSubstSubtable
.. autofunction :: buildAlternateSubstSubtable
.. autofunction :: buildLigatureSubstSubtable
2020-06-15 11:56:46 +01:00
--------------------------
GPOS Shared Table Builders
--------------------------
The functions help build the `GPOS shared tables <https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#shared-tables-value-record-anchor-table-and-mark-array-table> `_
as defined in the OpenType spec: value records, anchors, mark arrays and
mark record tables.
2021-12-02 15:31:49 +00:00
.. currentmodule :: fontTools.otlLib.builder
.. autofunction :: buildValue
.. autofunction :: buildAnchor
.. autofunction :: buildMarkArray
.. autofunction :: buildDevice
.. autofunction :: buildBaseArray
.. autofunction :: buildComponentRecord
2020-06-15 11:56:46 +01:00
------------------------------------
Low-level GPOS Table Lookup Builders
------------------------------------
These functions deal with the "simple" lookup types. See above for classes to
help build more complex lookups (contextual and chaining lookups).
2021-12-02 15:31:49 +00:00
.. currentmodule :: fontTools.otlLib.builder
.. autofunction :: buildCursivePosSubtable
.. autofunction :: buildLigatureArray
.. autofunction :: buildMarkBasePos
.. autofunction :: buildMarkBasePosSubtable
.. autofunction :: buildMarkLigPos
.. autofunction :: buildMarkLigPosSubtable
.. autofunction :: buildPairPosClassesSubtable
.. autofunction :: buildPairPosGlyphs
.. autofunction :: buildPairPosGlyphsSubtable
.. autofunction :: buildSinglePos
.. autofunction :: buildSinglePosSubtable
2020-06-15 11:56:46 +01:00
----------------------------
GDEF Table Subtable Builders
----------------------------
These functions build subtables for elements of the `` GDEF `` table.
2021-12-02 15:31:49 +00:00
.. currentmodule :: fontTools.otlLib.builder
.. autofunction :: buildAttachList
.. autofunction :: buildLigCaretList
.. autofunction :: buildMarkGlyphSetsDef
2020-06-15 11:56:46 +01:00
------------------
STAT Table Builder
------------------
2021-12-02 15:31:49 +00:00
.. currentmodule :: fontTools.otlLib.builder
.. autofunction :: buildStatTable
2024-05-30 00:19:39 +03:00
------------------
MATH Table Builder
------------------
.. currentmodule :: fontTools.otlLib.builder
.. autofunction :: buildMathTable