1################################################# 2otlLib: Routines for working with OpenType Layout 3################################################# 4 5The ``fontTools.otlLib`` library provides routines to help you create the 6subtables and other data structures you need when you are editing a font's 7``GSUB`` and ``GPOS`` tables: substitution and positioning rules, anchors, 8lookups, coverage tables and so on. 9 10------------------------------------------ 11High-level OpenType Layout Lookup Builders 12------------------------------------------ 13 14.. currentmodule:: fontTools.otlLib.builder 15 16.. autoclass:: AlternateSubstBuilder 17.. autoclass:: ChainContextPosBuilder 18.. autoclass:: ChainContextSubstBuilder 19.. autoclass:: LigatureSubstBuilder 20.. autoclass:: MultipleSubstBuilder 21.. autoclass:: CursivePosBuilder 22.. autoclass:: MarkBasePosBuilder 23.. autoclass:: MarkLigPosBuilder 24.. autoclass:: MarkMarkPosBuilder 25.. autoclass:: ReverseChainSingleSubstBuilder 26.. autoclass:: SingleSubstBuilder 27.. autoclass:: ClassPairPosSubtableBuilder 28.. autoclass:: PairPosBuilder 29.. autoclass:: SinglePosBuilder 30 31-------------------------------------- 32Common OpenType Layout Data Structures 33-------------------------------------- 34 35.. currentmodule:: fontTools.otlLib.builder 36 37.. autofunction:: buildCoverage 38.. autofunction:: buildLookup 39 40------------------------------------ 41Low-level GSUB Table Lookup Builders 42------------------------------------ 43 44These functions deal with the "simple" lookup types. See above for classes to 45help build more complex lookups (contextual and chaining lookups). 46 47.. currentmodule:: fontTools.otlLib.builder 48 49.. autofunction:: buildSingleSubstSubtable 50.. autofunction:: buildMultipleSubstSubtable 51.. autofunction:: buildAlternateSubstSubtable 52.. autofunction:: buildLigatureSubstSubtable 53 54-------------------------- 55GPOS Shared Table Builders 56-------------------------- 57 58The 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>`_ 59as defined in the OpenType spec: value records, anchors, mark arrays and 60mark record tables. 61 62.. currentmodule:: fontTools.otlLib.builder 63.. autofunction:: buildValue 64.. autofunction:: buildAnchor 65.. autofunction:: buildMarkArray 66.. autofunction:: buildDevice 67.. autofunction:: buildBaseArray 68.. autofunction:: buildComponentRecord 69 70------------------------------------ 71Low-level GPOS Table Lookup Builders 72------------------------------------ 73 74These functions deal with the "simple" lookup types. See above for classes to 75help build more complex lookups (contextual and chaining lookups). 76 77.. currentmodule:: fontTools.otlLib.builder 78 79.. autofunction:: buildCursivePosSubtable 80.. autofunction:: buildLigatureArray 81.. autofunction:: buildMarkBasePos 82.. autofunction:: buildMarkBasePosSubtable 83.. autofunction:: buildMarkLigPos 84.. autofunction:: buildMarkLigPosSubtable 85.. autofunction:: buildPairPosClassesSubtable 86.. autofunction:: buildPairPosGlyphs 87.. autofunction:: buildPairPosGlyphsSubtable 88.. autofunction:: buildSinglePos 89.. autofunction:: buildSinglePosSubtable 90 91---------------------------- 92GDEF Table Subtable Builders 93---------------------------- 94 95These functions build subtables for elements of the ``GDEF`` table. 96 97.. currentmodule:: fontTools.otlLib.builder 98 99.. autofunction:: buildAttachList 100.. autofunction:: buildLigCaretList 101.. autofunction:: buildMarkGlyphSetsDef 102 103------------------ 104STAT Table Builder 105------------------ 106 107.. currentmodule:: fontTools.otlLib.builder 108 109.. autofunction:: buildStatTable 110