Class TTFFont

Direct Known Subclasses:
CIDFontType2

public class TTFFont extends OutlineFont
A true-type font
  • Constructor Details

  • Method Details

    • getNames

      public Collection<String> getNames()

      getNames.

      Returns:
      a Collection object.
    • getOutline

      protected GeneralPath getOutline(char src, float width)
      Get a glyph outline by character code

      Note this method must always return an outline

      Get the outline of a character given the character code

      Specified by:
      getOutline in class OutlineFont
      Parameters:
      src - the character code of the desired glyph
      width - a float.
      Returns:
      the glyph outline
    • getOutlineFrom31CMap

      protected GeneralPath getOutlineFrom31CMap(char val, float width)
      lookup the outline using the (3, 1) cmap, as specified in 32000-1:2008, 9.6.6.4, when an Encoding is specified.
      Parameters:
      val - a char.
      width - a float.
      Returns:
      GeneralPath
    • getOutline

      protected GeneralPath getOutline(String name, float width)
      Get a glyph outline by name

      Get the outline of a character given the character name

      Specified by:
      getOutline in class OutlineFont
      Parameters:
      name - the name of the desired glyph
      width - a float.
      Returns:
      the glyph outline, or null if unavailable
    • getOutline

      protected GeneralPath getOutline(int glyphId, float width)

      Get the outline of a character given the glyph id

    • renderSimpleGlyph

      protected GeneralPath renderSimpleGlyph(GlyfSimple g)
      Render a simple glyf
      Parameters:
      g - a GlyfSimple object.
      Returns:
      a GeneralPath object.
    • renderCompoundGlyph

      protected GeneralPath renderCompoundGlyph(GlyfTable glyf, GlyfCompound g)
      Render a compound glyf
      Parameters:
      glyf - a GlyfTable object.
      g - a GlyfCompound object.
      Returns:
      a GeneralPath object.