PostScript glyph hint values¶
Usage¶
# example of accessing the hint data.
# from robofab.world import CurrentFont
Description¶
PostScriptGlyphHintValues is the class of the object found at aGlyph.psHints. It has a couple of attributes of its own which give you access to the glyph level PostScript hint information.
The PostScriptGlyphHintValues objects, in FontLab and NoneLab flavor, can respond to add, sub, mul, rmul, div and rdiv, so you can do math with them, for instance interpolations. Available since ChangeSet 44.
Attributes¶
-
hHints¶
List of (position, width) tuples for horizontal.
-
vHints¶
List of (position, width) tuples.
Methods¶
-
copy()¶
Returns a copy of the object. Both in FontLab and NoneLab the copy will be an objectsRF.PostScriptFontHintValues.
-
round()¶
Round the values to ints as much as the nature of the values allows.
Note
blueScaleis not rounded, it is a float.forceBoldis set toFalseif-0.5 < value < 0.5. Otherwise it will beTrue.blueShift,blueFuzzare rounded to integers.stemsare rounded to integers.bluesare rounded to integers.
-
asDict()¶
Returns a dictionary with all attributes and values of this object.
-
fromDict(aDict)¶
Rhis will look for familiar attributes in aDict and assign the value to the object.
-
update(anotherPSHintsObject)¶
This will copy values from the other object.