Class PDFGlyph

java.lang.Object
com.sun.pdfview.font.PDFGlyph

public class PDFGlyph extends Object
A single glyph in a stream of PDF text, which knows how to write itself onto a PDF command stream
  • Field Details

    • src

      private char src
      the character code of this glyph
    • name

      private String name
      the name of this glyph
    • advance

      private Point2D advance
      the advance from this glyph
    • shape

      private GeneralPath shape
      the shape represented by this glyph (for all fonts but type 3)
    • page

      private PDFPage page
      the PDFPage storing this glyph's commands (for type 3 fonts)
  • Constructor Details

    • PDFGlyph

      public PDFGlyph(char src, String name, GeneralPath shape, Point2D.Float advance)
      Creates a new instance of PDFGlyph based on a shape
    • PDFGlyph

      public PDFGlyph(char src, String name, PDFPage page, Point2D advance)
      Creates a new instance of PDFGlyph based on a page
  • Method Details

    • getChar

      public char getChar()
      Get the character code of this glyph
    • getName

      public String getName()
      Get the name of this glyph
    • getShape

      public GeneralPath getShape()
      Get the shape of this glyph
    • getPage

      public PDFPage getPage()
      Get the PDFPage for a type3 font glyph
    • addCommands

      public Point2D addCommands(PDFPage cmds, AffineTransform transform, int mode)
      Add commands for this glyph to a page
    • toString

      public String toString()
      Overrides:
      toString in class Object