﻿<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet type="text/xsl" href="../style/class_view.xsl"?>
<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 VFB file 
                          from which it was opened
  Font(Font, instances) - generate instance constructor, instances is a tuple
                          containing instance values for all MM axes defined 
                          in the font <rm>not reported by docstring</rm>
</CONSTRUCTOR>
<ATTRIBUTES>
  <IDENTIFICATION>
  file_name(string)        - full path of the file from which
                             the font was opened/saved
                             <rm>this attribute is not reported by the docstring</rm>
  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 as BitList:
                             italic       =  1
                             underscored  =  2
                             negative     =  4
                             outlined     =  8
                             strikethough = 16
                             bold         = 32
                            
  menu_name(string)        - font menu name
  apple_name(string)       - FOND Name
                             <rm>this attribute is not reported by the docstring</rm>
  fond_id(int)             - FOND ID
                             <rm>not reported by docstring, new in v4.5.2</rm>
  pref_family_name(string) - OpenType-specific font Family Name
                             <rm>this attribute is not reported by the docstring</rm>
  pref_style_name(string)  - OpenType-specific font Style Name
                             <rm>this attribute is not reported by the docstring</rm>
  mac_compatible(string)   - OpenType-specific font Mac Name
                             <rm>this attribute is not reported by the docstring</rm>
  default_character(string)- glyph name that represents the PFM default
                             character attribute <rm>not reported by docstring</rm>
  weight
  weight_code
  width
  designer(string)
  designer_url(string)
  fontnames[<cl>NameRecord</cl>]    - list of font name records
  copyright(string)        - Copyright name field
  notice(string)           - Notice field
  note(string)             - Font note
  unique_id(integer)       - Type 1 Unique ID number
  tt_u_id(string)          - TrueType Unique ID record
  tt_version(string)       - TrueType Version record
  trademark(string)
  x_u_id_num
  x_u_id
  vendor(string)           - TrueType vendor code
  vendor_url(string)
  version(string)
  year(integer)
  version_major(integer)
  version_minor(integer)
  vp_id(integer)
  ms_charset(integer)
  ms_id(integer)
  panose[integer]         - list of Panose values
  pcl_chars_set(string)
  pcl_id(integer)
  </IDENTIFICATION>
  <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(integer)
  underline_thickness(integer)
  </DIMENSIONS>
  <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

  other_blues_num(integer)             - number of defined OtherBlues values
  other_blues[integer[integer]]        - two-dimentional array of OtherBlues
                                         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
  stem_snap_h_num(integer)
  stem_snap_h
  stem_snap_v_num(integer)
  stem_snap_v
  </ALIGNMENT>
  <OTHER>
  modified(integer)      - 0 if unmodified, 1 if modified (to control the 
                           'save changes' dialog) <rm>this attribute is not 
                           reported by the docstring</rm>
  collection[integer]    - list of glyph indexes in the Collection panel 
                           <rm>new in v4.6.1 and not reported by docstring</rm>
  classes[string]        - list of glyph classes
  ot_classes(string)     - string containing the OT classes defined in the lower
                           right part of the OpenType panel <rm>this description 
                           is not reported by the docstring</rm>
  features[<cl>Feature</cl>]      - list of OpenType features
  customdata(string)     - font custom data field
  truetypetables[<cl>TrueTypeTable</cl>] - list of custom TrueType tables
  ttinfo(<cl>TTInfo</cl>)         - loaded TrueType information 
                                    (mostly hinting-related tables)
  encoding(<cl>Encoding</cl>)     - current encoding of the font
  codepages[integer]     - list of codepage-numbers (see OT-specs)
                           <rm>this attribute is not reported by the docstring
                           this attribute is linked with the
                           ttinfo.os2_ul_code_page_range1 and
                           ttinfo.os2_ul_code_page_range2 values</rm>
  unicoderanges[integer] - list of unicoderange-numbers (see OT-specs)
                           <rm>this attribute is not reported by the docstring</rm>
  glyphs[<cl>Glyph</cl>]          - array of glyphs
  source                 - the Created By field
                           <rm>this description is not reported by the docstring</rm>
  weight_vector[float]   - list of MM-settings for generate instance
  hguides [<cl>Guide</cl>]        - list of horizontal guides
                           <rm>new in v4.5.4 and not reported by docstring</rm>
  vguides [<cl>Guide</cl>]        - list of vertical guides
                           <rm>new in v4.5.4 and not reported by docstring</rm>
  </OTHER>
	</ATTRIBUTES>
	<OPERATIONS>
  len - returns number of glyphs
  [] - accesses glyphs array
</OPERATIONS>
	<METHODS>
  New()                 - clears the font
  Open(string filename) - opens font from VFB format
  Save(string filename) - saves font in VFB format
  OpenAFM(string filename, int mode, int layer)
                        - open AFM-File, mode is the integer bit field.
                          The bit list is:
                          ALLMETRICS       - 0x0001
                          THICKERMETRICS   - 0x0002
                          WIDERMETRICS     - 0x0004
                          CLOSEMETRICS     - 0x0008
                          REPLACEKERNING   - 0x0010
                          ADDKERNING       - 0x0020
                          AUTOKERNING      - 0x0040
                          REPLACEOTHERDATA - 0x0100
                          REPLACENAMES     - 0x0200
                          <rm>this method is not reported by the docstring</rm>
                          Constants for mode <rm>only in v4.5 Mac</rm>
                          mtALLMETRICS
                          mtTHICKERMETRICS
                          mtWIDERMETRIC
                          mtCLOSEMETRICS
                          mtREPLACEKERNING
                          mtADDKERNING
                          mtAUTOKERNING
                          mtREPLACEOTHERDATA
                          mtREPLACENAMES
  SaveAFM(string filename)
                        - saves AFM- and INF-File
                          <rm>this method is not reported by the docstring</rm>
  Reencode(<cl>Encoding</cl> E)|(<cl>Encoding</cl> E, integer style)
                        - applies <cl>Encoding</cl> E to Font
                        - possible style values: 
                          0: move glyphs to the new codepage
                          1: copy glyphs
                          <rm>the parameters of this method are not
                          reported by the docstring</rm>
  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() | (string path) - generates names for all glyphs, using 
     default NAM specified in path or default NAM file if path not present 
     <rm>optional path parameter is new in v4.54 Win/Mac</rm>
  GenerateGlyph(string definition) | (string definition, int flag)
   - returns a new glyph object built using definition; definition can be a glyph name 
     that should be included in the Mapping/alias.dat file or be a combination of 
     glyphnames separated by operators: 
     - the '_' operator creates a ligature that is automatically decomposed
     - the '+' operator creates a composite glyph by alighing all glyphs centrally; 
       '+' can be followed by an optional modifier: '&lt;': shift component to the left; 
       '&gt;': shift component to the right; '|': center component; '~': align component 
       on the baseline; '^' :shift component up by (cap height – x height)
     if flag equals 1, ligatures are not decomposed <rm>optional, new in v4.61 Win</rm>
  
  has_key(string name) | (Uni unicode) | (integer Unicode)
                        - finds glyph and return 1 (found) or 0 (not found)
                          <rm>this method is not reported by the docstring</rm>
  GenerateFont(fontType, filename)
                        - generates Font, see <cl>FontLab</cl> class for
                          description. <rm>As a method of the Font class, this 
                          method is deprecated. Since v4.52 Mac 
                          and v4.53 Win, GenerateFont is a method 
                          of the <cl>FontLab</cl> class</rm>    
</METHODS>
</Font>
