Class OutlineFont

All Implemented Interfaces:
FontMetrics
Direct Known Subclasses:
AFPFontConfig.AFPTrueTypeFont

public class OutlineFont extends AbstractOutlineFont
Default implementation of AbstractOutlineFont.
  • Constructor Details

    • OutlineFont

      public OutlineFont(String name, boolean embeddable, CharacterSet charSet, AFPEventProducer eventProducer)
      Construct outline font with specified name and character set.
      Parameters:
      name - font's name
      embeddable - whether or not this font is embeddable
      charSet - font's character set
      eventProducer - Handles any AFP related events
  • Method Details

    • getWidth

      public int getWidth(int character, int size)
      Obtain the width of the character for the specified point size.
      Parameters:
      character - the character
      size - the font size (in mpt)
      Returns:
      the width of the character for the specified point size
    • getBoundingBox

      public Rectangle getBoundingBox(int character, int size)
      Description copied from class: AFPFont
      Returns the bounding box of the glyph at the given index, for the given font size.
      Specified by:
      getBoundingBox in interface FontMetrics
      Specified by:
      getBoundingBox in class AFPFont
      Parameters:
      character - glyph index
      size - font size
      Returns:
      the scaled bounding box scaled in 1/1000ths of the given size