Skip to content

FL.Font

Font

Font - base class to represent font

CONSTRUCTOR: Font() - generic constructor, creates an empty Font Font(Font) - copy constructor Font(string filename) - creates a Font and assigns name of the file from which it was opened

ATTRIBUTES:

NAMES, COPYRIGHT AND IDENTIFICATION family_name(string) - font Family Name style_name full_name(string) - font Full Name font_name(string) - font Font Name font_style(integer) - Font Style menu_name(string) - font menu name weight weight_code width designer designer_url fontnames[NameRecord] - list of font name records copyright(string) - Copyright name field notice(string) - Notice field note(string) - Font note unique_id tt_u_id tt_version trademark x_u_id_num x_u_id vendor vendor_url version year version_major version_minor vp_id ms_charset ms_id panose[integer] - list of Panose values collection[collection] - list of glyph indexes in FontLab collection pcl_chars_set pcl_id

DIMENSIONS upm ascender[integer] - list of ascenders, one for each master descender[integer] - list of descenders, one for each master cap_height[integer] - list of CapHeight records, one for each master x_height[integer] - list of xHeight values, one for each master default_width slant_angle italic_angle(float) - Italic Angle is_fixed_pitch underline_position underline_thickness

ALIGNMENT blue_fuzz blue_scale blue_shift blue_values_num(integer) - number of defined blue values blue_values[integer[integer]] - two-dimentional array of BlueValues - master index is top-level index family_blues_num(integer) - number of FamilyBlues records family_blues[integer[integer]] - two-dimentional array of FamilyBlues - master index is top-level index family_other_blues_num(integer) - number of FamilyOtherBlues records family_other_blues[integer[integer]] - two-dimentional array of FamilyOtherBlues - master index is top-level index force_bold[integer] - list of Force Bold values, one for each master other_blues_num other_blues[integer[integer]] - two-dimentional array of OtherBlues - master index is top-level index stem_snap_h_num stem_snap_h stem_snap_v_num stem_snap_v

OTHER ATTRIBUTES classes[string] - list of glyph classes ot_classes - OpenType classes data classes_text - glyph classes compiled in ot_classes format features[Feature] - list of OpenType features customdata(string) - font custom data field truetypetables[TrueTypeTable] - list of custom TrueType tables ttinfo(TTInfo) - loaded TrueType information (mostly hinting-related tables) encoding glyphs[Glyph] - array of glyphs source weight_vector measurement - position of the measurement line for the font

OPERATIONS: len - returns number of glyphs [] - accesses glyphs array

METHODS New() - clears the font Open(string filename) - opens font from VFB format Save(string filename) - saves font in VFB format Reencode() FindGlyph(string name) | (Uni unicode) | (integer Unicode) - finds glyph and return its index or -1 DefineAxis(string Name, string Type, string ShortName) - defines the new Multiple Master axis DeleteAxis(axisindex, float position) - removes the axis GenerateUnicode() - generates Unicode indexes for all glyphs GenerateNames() - generates names for all glyphs GenerateGlyph(string glyphname) - generates new glyph using 'glyphname' as a source of information about glyph's composition MakeKernFeature([WeightVector vector]) - generates 'kern' feature using font kerning and classes MergeFonts(Font source[, flags]) - appends all glyphs from the source font. Check mfXXXX constants for options SetClassFlags(int class_index, bool left, bool right) - allows to set 'left' and 'right' properties of the kerning class SetClassFlags(int class_index, bool lsb, bool rsb, bool width) - allows to set 'lsb', 'rsb' and 'width' properties of the metrics class GetClassLeft(int class_index) - returns the 'left' property of the class GetClassRight(int class_index) - returns the 'right' property of the class GetClassMetricsFlags(int class_index) - returns the tuple containing LSB, RSB and Width flags of the metrics class

Native bases: object

Captured native MRO: Font, object

Native new allocation evidence (not an init overload): (args, *kwargs) Create and return a new object. See help(type) for accurate signature.

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
DefineAxis function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.DefineAxis; argument details are not documented.
DeleteAxis function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.DeleteAxis; argument details are not documented.
FindGlyph function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.FindGlyph; argument details are not documented.
GenerateGlyph function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.GenerateGlyph; argument details are not documented.
GenerateNames function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.GenerateNames; argument details are not documented.
GenerateUnicode function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.GenerateUnicode; argument details are not documented.
GetClassLeft function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.GetClassLeft; argument details are not documented.
GetClassMetricsFlags function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.GetClassMetricsFlags; argument details are not documented.
GetClassRight function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.GetClassRight; argument details are not documented.
MakeKernFeature function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.MakeKernFeature; argument details are not documented.
MergeFonts function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.MergeFonts; argument details are not documented.
New function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.New; argument details are not documented.
Open function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.Open; argument details are not documented.
OpenAFM function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.OpenAFM; argument details are not documented.
Save function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.Save; argument details are not documented.
SaveAFM function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.SaveAFM; argument details are not documented.
SetClassFlags function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.SetClassFlags; argument details are not documented.
__init__ function (self, /, *args: Any, **kwargs: Any) -> None Initialize self. (shared captured text)
has_key function (self, *args: Any, **kwargs: Any) -> Any Native FL.Font.has_key; argument details are not documented.