RoboFab RInfo
Usage
from robofab.world import CurrentFont f = CurrentFont() print f.info.fullName >>> MyFont Regular print f.info.designer >>> Huib van Krimpen f.info.designer = "Jan van Krimpen" print f.info.designer >>> Jan van Krimpen print f.info.ttVendor >>> LTTR print f.info.unitsPerEm >>> 1000 print f.info.xHeight >>> 307 print f.info.licenseURL >>> http://www.letterror.com/foundry/license.html # but you can set the values as well f.info.uniqueID = 4309359 f.info.designer = "Eric Gill"
Description
RInfo contains all names, numbers, URL's, values, etc. that would otherwise clutter up the font object. You don't have to create a RInfo object yourself, RFont makes one when it is created. In FontLab the RInfo data is tunneled to the appropriate places in the FontLab font. In UFO land the data ends up in info.plist. In all implementations RInfo doesn't check the validity of the entries, it just provides storage or access to them. It is likely that the attributes of RInfo are extended in the future.
Attributes
The list below is likely to grow.
- ascender: ascender value, an integer
- capHeight: cap height value, an integer
- copyright: copyright string, a string
- createdBy: field for the creator for the font, i.e. the foundry
- defaultWidth: value for default width of missing glyphs, an integer
- designer: name of the designer, a string
- designerURL: web address for the designer, a URL
- familyName: family name of the font, a string
- fondID: MacOS FOND resource number, an integer
- fondName: MacOS FOND name, a string
- fontName: font name, a string
- fontStyle: the font style code, integer
- fullName: the full name of the font, a string
- parent: reference to the parent object (a font usually)
- italicAngle: the italic angle, integer
- license: the font license text, a string
- licenseURL: web address for the license agreement, a URL
- menuName: one of the menu names, a string
- msCharSet: flag for windows fonts
- note: the font note, a string
- notice: a notice about the font, different from note and copyrright, a string
- otFamilyName: family name specific for OpenType fonts a string
- otStyleName: style name specific for OpenType fonts, a string
- otMacName: Mac name specific for OpenType fonts, a string
- selected: whether or not the font is selected, a boolean
- slantAngle: slant angle, different from italic angle, an integer
- styleName: the style name, a string
- trademark: the trademark statement, a string
- ttUniqueID: unique ID for TrueType fonts, an integer
- ttVendor: Microsoft vendor code, a 4 character string
- ttVersion: which truetype version
- uniqueID: unique PostScript ID number, an integer
- unitsPerEm: units per em, integer
- vendorURL: web address for the font's vendor, a URL
- versionMajor: value for major version
- versionMinor: value for minor version
- weightName: the name of the weight, i.e. "Semi Bold", used in naming stuff.
- weightValue: value for the weight. FontLab calls Regular 500 (or something like that)
- widthName: the name of the width, i.e. "Condensed"
- year: the year in which the font was produced