RoboFab

Support RoboFab

Up

See also

More links





RoboFab Mailinglist

Join the RoboFab users community at Google groups. Visit this group

Email:

RoboFadvertising

RoboFab RKerning

Usage

# robofab manual
#     Kerning object
#    usage examples

f = CurrentFont()
print f.kerning

# getting a value from the kerning dictionary
print f.kerning[('V', 'A')]
print f.kerning[('T', 'X')]
print f.kerning.keys()

➔ Download this.
< RKerning for Mailer-Regular >
-123
None
[('X', 'emdash'),
    ('K', 'v'),
    ('two', 'perthousand'),
    ('guilsinglleft', 'a'),
    ... etc.]

Description

RKerning is a dictionary of kerning values. RFont makes a RKerning object when it is created and makes available as aFont.kerning attribute. The keys are tuples of the glyphs listed by their names: ('T', 'e'), ('V', 'A') etc. None is returned if the pair does not exist, rather than raising an IndexError. The parent of a kerning object is usually a Font.

Methods