Glyph

===============================================
  Glyph - class to represent glyph
===============================================

CONSTRUCTOR

  Glyph()             - generic constructor, creates an empty glyph
  Glyph(Glyph)        - copy constructor
  Glyph(masterscount) - creates a glyph with 'masterscount' number of masters
  Glyph(masterscount, [Node, ...])
                      - creates a glyph with 'masterscount' number of masters
                        and assigns a list of nodes

	

ATTRIBUTES

  parent (read-only)      - Glyph's parent object, Font
  nodes [Node]            - list of Nodes
  customdata (string)     - custom data defined for this glyph
  note (string)           - note defined for this glyph
  mark (integer)          - True if glyph is marked
  anchors [Anchor]        - list of anchors
  hhints [Hint]           - list of horizontal hints
  vhints [Hint]           - list of vertical hints
  hlinks [Link]           - list of horizontal links
  vlinks [Link]           - list of vertical links
  hguides [Guide]         - list of horizontal guides
                            (not reported by docstring)
  vguides [Guide]         - list of vertical guides
                            (not reported by docstring)
  components [Component]  - list of componets
  replace_table [Replace] - hint replacing program, list of Replace objects
  kerning [KerningPair]   - list of kerning pairs
  layers_number (integer) - number of masters
  flags (integer)         - flags set for this glyph
  nodes_number (integer)  - number of nodes, same as 'len(Glyph)'
  width (integer)         - advance width for the first master
  height (integer)        - advance height for the first master
  unicode (integer)       - first Unicode index in integer form
  unicodes [integer]      - list of Unicode indexes
  name (string)           - glyph name
  image [Image]           - background image (new in FL 4.53 Win)
  index (integer)         - (read-only) glyph index, -1 if orphan glyph (not reported by docstring)

TRUETYPE-DATA

  advance_width (integer)
  advance_height (integer)
  left_side_bearing (integer)
  top_side_bearing (integer)
  y_pels (integer)
  bounding_box (Rect)
  number_of_contours (integer)
  end_points [integer]
  points [TTPoint]
  instructions [Byte]
  hdmx[Byte]


OPERATIONS

  len() - returns number of nodes in the glyph
  [] - can be used to access individial nodes
  slice - can be used to access portion of the glyph's nodes array
  + or concatination - can be used to append Glyph, Node or sequence of Nodes
  multiply - second operand must be Matrix, applies matrix transformation to a glyph

METHODS

  Assign (Glyph)                 - copies all information from the assigned glyph
  Transform(Matrix m)            - applies Matrix transformation to the Glyph (see Matrix().__doc__)
  SetLayersNumber(mastersnumber) - changes the number of masters, is applicable only 
                                   to glyphs that have no parent
  Clear()                        - removes all nodes
  Add                            - refer to '+' operator

  Insert (Node | Glyph | [Node]) | (Node | Glyph | 
          [Node], nodeindex)
                                 - inserts Node, Glyph or sequence of Nodes
                                   at the begining of glyph's nodes or at specified node index

  Present (style)                - returns True if a layer or a combination of layers
                                   are present in the glyph

  Delete (index) | (index0, index1) - removes node or range of nodes
  ExpandLayer (masterindex)      - expands selected master to all other masters
  Shift (Point) | (Point, masterindex)
                                 - shifts positions of all nodes at first or specified master
  Scale (Point(float) scale) | (Point(float) scale, Point center) | 
        (Point(float) scale, Point center, masterindex) - scales the glyph
  Layer (masterindex)            - returns list of Points for all nodes for the selected master
  Section (masterindex, pointindex, nodetype) - returns list of Points that conform to selected options
  MoveNode(...)                  - moves the node copying Edit tool behavior (see User manual for details)
  DeleteNode(nodeindex)          - removes the Node
  InsertNode(nodeindex) | (nodeindex, float time) | (nodeindex, float time, masterindex) - insers new node on a contour

SELECTION-METHODS

  Selection()                    - returns list of selected Nodes
  SelectAll()                    - selects all Nodes
  UnselectAll()                  - deselects all Nodes
  InvertSelection()              - selects unselected Nodes and deselects selected Nodes
  isAnySelected()                - returns True if at least one Node is selected
  SelectedCount()                - returns number of selected Nodes
  SelectRect(Rect r) | (Rect r, masterindex) 
                                 - selects all Nodes that are inside the rectangle
  UnselectRect(Rect r) | (Rect r, masterindex) 
                                 - deselects all Nodes that are inside the rectangle
  DeleteSelected() - deletes all selected Nodes

METRICS-METHODS

  GetBoundingRect() | (masterindex) - returns Rect - bounding box of the glyph
  GetMetrics() | (masterindex)      - returns glyph advance width and advance height
                                      in a form of Point
  SetMetrics(Point p) | (Point p, masterindex)
                                    - assigns new values to the width and height of the glyph
  GetVSB() | (masterindex)          - returns glyph bottom sidebearing position
  SetVSB(value) | (value, masterindex) - assigns new values to the bottom sidebearing of the glyph

OVERLAP-METHODS

  RemoveOverlap() | (masterindex)  - removes overlap
  Badd(Glyph g) | ([Node]) | (Glyph g, masterindex) | ([Node], masterindex)
                                   - performs bollean Add operation with the glyph or list of nodes
  Bsubtract(Glyph g) | ([Node]) | (Glyph g, masterindex) | ([Node], masterindex)
                                   - performs bollean Subtract operation with the glyph or list of nodes
  Bintersect(Glyph g) | ([Node]) | (Glyph g, masterindex) | ([Node], masterindex)
                                   - performs bollean Insersect operation with the glyph or list of nodes

CONTOUR-METHODS

  GetContoursNumber()              - returns number of contours in the glyph
  GetContourBegin(contourindex)    - returns index of the first node for a contour
  GetContourLength(contourindex)   - returns number of nodes in a contour
  SelectContour(contourindex)      - selects all nodes in the contour
  DeleteContour(contourindex)      - removes contour
  ReverseContour(contourindex)     - reverses contour's direction
  ReorderContour(contourindex, newindex) - reorders contours in the glyph
  isContourClockwise(contourindex) - returns True if direction of contour is clockwise
  SetStartNode(nodeindex)          - makes the node a starting node of the contour
  FindContour(nodeindex)           - returns number of contour containing the 'nodeindex'

HINTS-METHODS

  RemoveHints(integer mode)        - removes hints and links
  Autohint() | (masterindex)       - automatically generates Type 1 hints

ANCHOR-METHODS

  FindAnchor(string name)          - finds Anchor by name

TRANSFORMATION-METHODS

  Decompose()                      - pastes all components to the glyph outline
  MakeExtremeNodes() | (masterindex) - automatically detects and adds extreme nodes
  Audit() | (masterindex)          - performs test of the glyph and returns list of AuditRecord objects
  Iterate(Iterator)                - iterates glyph trough iterator class which must include following methods:
                                     Start(); ClosePath(); StartPath(Node); LineTo(Node); 
                                     CurveTo(Node); SplineTo(Node); Finish()
  Rotate3D
  Extrude3D(outlinewidth, shift_x, shift_y)
  Shadow(outlinewidth, shift_x, shift_y)
  College(outlinewidth, distance)
  Gradient(outlinewidth, direction, stripes_number, start_y, finish_y)
  Distance(width_x, width_y, cornermode) | (width_x, width_y, cornermode, Glyph dest)
  Interpolate([(nodeindex, Point newposition])
  Warp([Point], float force)
  Rasterize(Image)
  Blend(Glyph source, integer layer1, integer layer2, Point amount)
                                  - returns blend of the glyph and source
  JoinAll()                       - tries to join all open contours
                                    (new in v4.5.4)
  SaveEPS(string filename) | (string filename, layer) 
                                  - writes layer into the EPS file named filename
                                    (new in v4.5.4)
  LoadEPS(string filename)        - reads EPS from filename and returns Glyph object. 
                                    Use Assign method to replace current glyph with the loaded outline
                                    (new in v4.5.4)
  R([Point], float force)         - (?? comes from the __doc__-string but raises an AttributeError)