RInfo

class RInfo()

asDict()

Return the info object as a dictionary.

clear()

Clear all info data.

update(otherInfo)

Update the info object with an other info object.

addObserver(observer, methodName, notification)

Add an observer object. that will receive notification for the given methodName.

asDefcon()

Return the defcon object.

asFontParts()

Return a fontParts object

destroyAllRepresentations(notification=None)

Destroy all representations.

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.

holdChanges()

Capture changes and bundle them in a single change in a with statement.

performUndo()

Create a undo item and add it the the undo manager.

prepareUndo(undoTitle='')

Save the current state of the object.

releaseHeldChanges()

removeObserver(observer, notification)

Remove an observer object for a notification.

undo(undoTitle='')

Capture the current state of the object and create a undo item in a with statement.

Optionally an undoTitle can be provided.

Inherits from subclass: fontParts.fontshell.info.RInfo

copyAttributes

font

The info’s parent font.

fontInfoAttributesVersion3

changed()

naked()

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()

copyData(source)

Subclasses may override this method. If so, they should call the super.

getParent()

setChanged()

setParent(parent)

Last edited on 15/11/2024