RInfo

class RInfo()

asDict()

Return the info object as a dictionary.

clear()

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.

getRepresentation(name, **kwargs)

Get a representation by name.

Optionally arguments could be provided if the representation factory requires arguments.

performUndo()

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

prepareUndo(undoTitle='')

Save the current state of the object.

removeObserver(observer, notification)

Remove an observer object for a notification.

Inherits from subclass: fontParts.fontshell.info.RInfo

copyAttributes

font

The info’s parent font.

fontInfoAttributesVersion3

naked()

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

validateFontInfoVersion3ValueForAttribute(attr, value)

This performs very basic validation of the value for attribute following the UFO 3 fontinfo.plist specification. The results of this should not be interpretted as correct for the font that they are part of. This merely indicates that the value is of the proper type and, where the specification defines a set range of possible values for an attribute, that the value is in the accepted range.

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

copyData(source)

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

getParent()

setChanged()

setParent(parent)

Last edited on 15/05/2018