RoboFab RKerning


# 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 >
[('X', 'emdash'),
    ('K', 'v'),
    ('two', 'perthousand'),
    ('guilsinglleft', 'a'),
    ... etc.]


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.