RInfo
class RInfo()
addObserver(observer, methodName, notification)
Add an observer object. that will receive notification for the given methodName.
destroyRepresentation(name, **kwargs)
Destroy the stored representation for name and optionally kwargs.
getRepresentation(name, **kwargs)
Get a representation by name.
Optionally arguments could be provided if the representation factory requires arguments.
undo(undoTitle='')
Capture the current state of the object and create a undo item in a with
statement.
Optionally an undoTitle
can be provided.
fromMathInfo(mathInfo, guidelines=True)
Replaces the contents of this info object with the contents of mathInfo
.
font.fromMathInfo(mg)
mathInfo
must be an object following the
MathInfo protocol .
interpolate(factor, minInfo, maxInfo, round=True, suppressError=True)
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.
round()
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
toMathInfo(guidelines=True)
Returns the info as an object that follows the MathGlyph protocol .
mg = font.info.toMathInfo()