Skip to content

# `typerig.proxy.objects.kern`

## typerig.proxy.objects.kern (version 0.26.3)

    # MODULE: Typerig / Proxy / Kern (Objects)
    # -----------------------------------------------------------
    # (C) Vassil Kateliev, 2018-2020        (http://www.kateliev.com)
    # (C) Karandash Type Foundry            (http://www.karandash.eu)
    #------------------------------------------------------------
    # www.typerig.com

### Modules

- fontgate
- fontlab
- PythonQt

### Classes

- builtin.object
- - pKerning

## class pKerning(builtin.object)

      Proxy to fgKerning object

      Constructor:
              pKerning(fgKerning)

      Attributes:
              .fg (fgKerning): Original Fontgate Kerning object
              .groups (fgKerningGroups): Fontgate Group kerning object

#### Methods

init(self, fgKerningObject, externalGroupData=None)

repr(self)

addGroup(self, key, glyphNameList, type)

      Adds a new group to fonts kerning groups.
      Args:
              key (string): Group name
              glyphNameList (list(string)): List of glyph names
              type (string): Kern group types: L - Left group (1st), R - Right group (2nd), B - Both (1st and 2nd)
              layer (None, Int, String)

      Returns:
              None

asDict(self)

asList(self)

clear(self)

      # - Basic functions -------------------------------------

getKerningForLeaders(self, transformLeft=None, transformRight=None)

      Now in FL6 we do not have leaders, but this returns the first glyph name in the group

getPair(self, pairTuple)

getPairGroups(self, pairTuple)

getPairObject(self, pairTuple)

groups(self)

groupsAsDict(self)

groupsBiDict(self)

groupsFromDict(self, groupDict)

newPair(self, glyphLeft, glyphRight, modeLeft, modeRight)

removeGroup(self, key)

      Remove a group from fonts kerning groups at given layer.

renameGroup(self, oldkey, newkey)

      Rename a group in fonts kerning groups at given layer.

resetGroups(self)

setExternalGroupData(self, externalGroupData)

setPair(self, pairTuple, modeTuple=(0, 0))

setPairs(self, pairTupleList, extend=False)

storeExternalGroupData(self)

#### Descriptors

dict

      dictionary for instance variables (if defined)

weakref

      list of weak references to the object (if defined)

## `pKerning`

## typerig.proxy.objects.kern.pKerning = class pKerning(__builtin__.object)

      Proxy to fgKerning object

      Constructor:
              pKerning(fgKerning)

      Attributes:
              .fg (fgKerning): Original Fontgate Kerning object
              .groups (fgKerningGroups): Fontgate Group kerning object

#### Methods

__init__(self, fgKerningObject, externalGroupData=None)

__repr__(self)

addGroup(self, key, glyphNameList, type)

      Adds a new group to fonts kerning groups.
      Args:
              key (string): Group name
              glyphNameList (list(string)): List of glyph names
              type (string): Kern group types: L - Left group (1st), R - Right group (2nd), B - Both (1st and 2nd)
              layer (None, Int, String)

      Returns:
              None

asDict(self)

asList(self)

clear(self)

      # - Basic functions -------------------------------------

getKerningForLeaders(self, transformLeft=None, transformRight=None)

      Now in FL6 we do not have leaders, but this returns the first glyph name in the group

getPair(self, pairTuple)

getPairGroups(self, pairTuple)

getPairObject(self, pairTuple)

groups(self)

groupsAsDict(self)

groupsBiDict(self)

groupsFromDict(self, groupDict)

newPair(self, glyphLeft, glyphRight, modeLeft, modeRight)

removeGroup(self, key)

      Remove a group from fonts kerning groups at given layer.

renameGroup(self, oldkey, newkey)

      Rename a group in fonts kerning groups at given layer.

resetGroups(self)

setExternalGroupData(self, externalGroupData)

setPair(self, pairTuple, modeTuple=(0, 0))

setPairs(self, pairTupleList, extend=False)

storeExternalGroupData(self)

#### Descriptors

__dict__

      dictionary for instance variables (if defined)

__weakref__

      list of weak references to the object (if defined)

### `removeGroup`

typerig.proxy.objects.kern.pKerning.removeGroup = removeGroup(self, key) unbound typerig.proxy.objects.kern.pKerning method

      Remove a group from fonts kerning groups at given layer.

### `renameGroup`

typerig.proxy.objects.kern.pKerning.renameGroup = renameGroup(self, oldkey, newkey) unbound typerig.proxy.objects.kern.pKerning method

      Rename a group in fonts kerning groups at given layer.

### `addGroup`

typerig.proxy.objects.kern.pKerning.addGroup = addGroup(self, key, glyphNameList, type) unbound typerig.proxy.objects.kern.pKerning method

      Adds a new group to fonts kerning groups.
      Args:
              key (string): Group name
              glyphNameList (list(string)): List of glyph names
              type (string): Kern group types: L - Left group (1st), R - Right group (2nd), B - Both (1st and 2nd)
              layer (None, Int, String)

      Returns:
              None

### `getKerningForLeaders`

typerig.proxy.objects.kern.pKerning.getKerningForLeaders = getKerningForLeaders(self, transformLeft=None, transformRight=None) unbound typerig.proxy.objects.kern.pKerning method

      Now in FL6 we do not have leaders, but this returns the first glyph name in the group