Info¶
Description¶
The Info
object contains all names, numbers, URLs, dimensions, values, etc. that would otherwise clutter up the font object. You don’t have to create a Info
object yourself, Font
makes one when it is created.
Info
validates any value set for a Info <BaseInfo> item, but does not check if the data is sane (i.e., you can set valid but incorrect data).
The Info
object (as any other fontParts object) does not allow to modify mutable containers (like lists) in-place. Always get a value, modify it and then set it back to perform an edit.
For a list of info attributes, refer to the UFO fontinfo.plist Specification.
Overview¶
Copy this object into a new object of the same type. |
|
The info's parent font. |
|
Interpolate all pairs between minInfo and maxInfo. |
|
Round the following attributes to integers: |
|
Update this object with the values from otherInfo. |
|
Return the environment's native object that has been wrapped by this object. |
|
Tell the environment that something has changed in the object. |
Reference¶
Copy¶
- BaseInfo.copy()¶
Copy this object into a new object of the same type. The returned object will not have a parent object.
Parents¶
- BaseInfo.font¶
The info’s parent font.
Interpolation¶
- BaseInfo.interpolate(factor, minInfo, maxInfo, round=True, suppressError=True)[source]¶
Interpolate all pairs between minInfo and maxInfo. The interpolation occurs on a 0 to 1.0 range where minInfo is located at 0 and maxInfo is located at 1.0.
factor is the interpolation value. It may be less than 0 and greater than 1.0. It may be a number (integer, float) or a tuple of two numbers. If it is a tuple, the first number indicates the x factor and the second number indicates the y factor.
round indicates if the result should be rounded to integers.
suppressError indicates if incompatible data should be ignored or if an error should be raised when such incompatibilities are found.
Normalization¶
- BaseInfo.round()[source]¶
Round the following attributes to integers:
unitsPerEm
descender
xHeight
capHeight
ascender
openTypeHeadLowestRecPPEM
openTypeHheaAscender
openTypeHheaDescender
openTypeHheaLineGap
openTypeHheaCaretSlopeRise
openTypeHheaCaretSlopeRun
openTypeHheaCaretOffset
openTypeOS2WidthClass
openTypeOS2WeightClass
openTypeOS2TypoAscender
openTypeOS2TypoDescender
openTypeOS2TypoLineGap
openTypeOS2WinAscent
openTypeOS2WinDescent
openTypeOS2SubscriptXSize
openTypeOS2SubscriptYSize
openTypeOS2SubscriptXOffset
openTypeOS2SubscriptYOffset
openTypeOS2SuperscriptXSize
openTypeOS2SuperscriptYSize
openTypeOS2SuperscriptXOffset
openTypeOS2SuperscriptYOffset
openTypeOS2StrikeoutSize
openTypeOS2StrikeoutPosition
openTypeVheaVertTypoAscender
openTypeVheaVertTypoDescender
openTypeVheaVertTypoLineGap
openTypeVheaCaretSlopeRise
openTypeVheaCaretSlopeRun
openTypeVheaCaretOffset
postscriptSlantAngle
postscriptUnderlineThickness
postscriptUnderlinePosition
postscriptBlueValues
postscriptOtherBlues
postscriptFamilyBlues
postscriptFamilyOtherBlues
postscriptStemSnapH
postscriptStemSnapV
postscriptBlueFuzz
postscriptBlueShift
postscriptDefaultWidthX
postscriptNominalWidthX
Update¶
Environment¶
- BaseInfo.naked()¶
Return the environment’s native object that has been wrapped by this object.
>>> loweLevelObj = obj.naked()
- BaseInfo.changed(*args, **kwargs)¶
Tell the environment that something has changed in the object. The behavior of this method will vary from environment to environment.
>>> obj.changed()