Class PDFTextUtil

java.lang.Object
org.apache.fop.pdf.PDFTextUtil
org.apache.fop.svg.PDFTextUtil

public abstract class PDFTextUtil extends PDFTextUtil
Utility class for generating PDF text objects. It needs to be subclassed to add writing functionality (see PDFTextUtil.write(String)).
  • Constructor Details

    • PDFTextUtil

      public PDFTextUtil(FontInfo fontInfo)
      Main constructor.
      Parameters:
      fontInfo - the font catalog
  • Method Details

    • initValues

      protected void initValues()
      Resets the state fields.
      Overrides:
      initValues in class PDFTextUtil
    • getCurrentFont

      public Font getCurrentFont()
      Returns the current font in use.
      Returns:
      the current font or null if no font is currently active.
    • getCurrentEncoding

      public int getCurrentEncoding()
      Returns the current encoding.
      Returns:
      the current encoding
    • setCurrentFont

      public void setCurrentFont(Font f)
      Sets the current font.
      Parameters:
      f - the new font to use
    • setCurrentEncoding

      public void setCurrentEncoding(int encoding)
      Sets the current encoding.
      Parameters:
      encoding - the new encoding
    • isMultiByteFont

      protected boolean isMultiByteFont(String name)
      Determines whether the font with the given name is a multi-byte font.
      Parameters:
      name - the name of the font
      Returns:
      true if it's a multi-byte font
    • isCIDFont

      protected boolean isCIDFont(String name)
    • writeTf

      public void writeTf(Font f)
      Writes a "Tf" command, setting a new current font.
      Parameters:
      f - the font to select