This object will create the “parts” needed by the FDK. The only external method is ufo2fdk.tools.makeotfParts.compile(). There is one attribute, ufo2fdk.tools.makeotfParts.path that may be referenced externally. That is a dictionary of paths to the various parts.
When creating this object, you must provide a font object and a path indicating where the parts should be saved. Optionally, you can provide a glyphOrder list of glyph names indicating the order of the glyphs in the font. You may also provide an outlineCompilerClass argument that will serve as the outline source compiler. The class passed for this argument must be a subclass of ufo2fdk.tools.outlineOTF.OutlineOTFCompiler.
Make the features source file. If any tables or the kern feature are defined in the font’s features, they will not be overwritten.
This should not be called externally. Subclasses may override this method to handle the file creation in a different way if desired.
Make the font info source file. This gets the values for the file using the fallback system as described below:
IsItalicStyle | styleMapStyleName |
IsBoldStyle | styleMapStyleName |
PreferOS/2TypoMetrics | openTypeOS2Selection |
IsOS/2WidthWeigthSlopeOnly | openTypeOS2Selection |
IsOS/2OBLIQUE | openTypeOS2Selection |
This should not be called externally. Subclasses may override this method to handle the file creation in a different way if desired.
Make the glyph order source file.
This should not be called externally. Subclasses may override this method to handle the file creation in a different way if desired.
Make the menu name source file. This gets the values for the file using the fallback system as described below:
[PS] | postscriptFontName |
f= | openTypeNamePreferredFamilyName |
s= | openTypeNamePreferredSubfamilyName |
l= | styleMapFamilyName |
m=1, | openTypeNameCompatibleFullName |
This should not be called externally. Subclasses may override this method to handle the file creation in a different way if desired.
Make the outline source file.
This should not be called externally. Subclasses may override this method to handle the file creation in a different way if desired.
Write the OS/2 to a string and return it.
This gets the values for the file using the fallback system as described below:
FSType | openTypeOS2Type |
Panose | openTypeOS2Panose |
UnicodeRange | openTypeOS2UnicodeRanges |
CodePageRange | openTypeOS2CodePageRanges |
TypoAscender | openTypeOS2TypoAscender |
TypoDescender | openTypeOS2TypoDescender |
TypoLineGap | openTypeOS2TypoLineGap |
winAscent | openTypeOS2WinAscent |
winDescent | openTypeOS2WinDescent |
XHeight | xHeight |
CapHeight | capHeight |
WeightClass | openTypeOS2WeightClass |
WidthClass | openTypeOS2WidthClass |
Vendor | openTypeOS2VendorID |
This should not be called externally. Subclasses may override this method to handle the string creation in a different way if desired.
Write the head to a string and return it.
This gets the values for the file using the fallback system as described below:
X.XXX | versionMajor.versionMinor |
This should not be called externally. Subclasses may override this method to handle the string creation in a different way if desired.
Write the hhea to a string and return it.
This gets the values for the file using the fallback system as described below:
Ascender | openTypeHheaAscender |
Descender | openTypeHheaDescender |
LineGap | openTypeHheaLineGap |
CaretOffset | openTypeHheaCaretOffset |
This should not be called externally. Subclasses may override this method to handle the string creation in a different way if desired.
Write the kern feature to a string and return it.
This should not be called externally. Subclasses may override this method to handle the string creation in a different way if desired.
Write the name to a string and return it.
This gets the values for the file using the fallback system as described below:
nameid 0 | copyright |
nameid 7 | trademark |
nameid 8 | openTypeNameManufacturer |
nameid 9 | openTypeNameDesigner |
nameid 10 | openTypeNameDescription |
nameid 11 | openTypeNameManufacturerURL |
nameid 12 | openTypeNameDesignerURL |
nameid 13 | openTypeNameLicense |
nameid 14 | openTypeNameLicenseURL |
nameid 19 | openTypeNameSampleText |
This should not be called externally. Subclasses may override this method to handle the string creation in a different way if desired.