Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.svg
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)`).

Field Summary

Fields inherited from class org.apache.fop.pdf.PDFTextUtil
`TR_CLIP, TR_FILL, TR_FILL_CLIP, TR_FILL_STROKE, TR_FILL_STROKE_CLIP, TR_INVISIBLE, TR_STROKE, TR_STROKE_CLIP`

Constructor Summary
`PDFTextUtil(FontInfo fontInfo)` Main constructor.

Method Summary
`int` | `getCurrentEncoding()` Returns the current encoding.
`Font` | `getCurrentFont()` Returns the current font in use.
`protected void` | `initValues()` Resets the state fields.
`protected boolean` | `isMultiByteFont(java.lang.String name)` Determines whether the font with the given name is a multi-byte font.
`Font` | `selectFontForChar(char ch)` Selects a font from the font list suitable to display the given character.
`void` | `setCurrentEncoding(int encoding)` Sets the current encoding.
`void` | `setCurrentFont(Font f)` Sets the current font.
`void` | `setFont(Font font)` Sets the current font for the text object.
`void` | `setFonts(Font[] fonts)` Sets the current fonts for the text object.
`void` | `writeTf(Font f)` Writes a "Tf" command, setting a new current font.
`void` | `writeTJChar(char ch)` Writes a char to the "TJ-Buffer".

Methods inherited from class org.apache.fop.pdf.PDFTextUtil
`adjustGlyphTJ, beginTextObject, concatMatrix, endTextObject, isInTextObject, setTextRenderingMode, setTextRenderingMode, updateTf, write, writeTd, writeTextMatrix, writeTf, writeTJ, writeTj, writeTJMappedChar`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PDFTextUtil

    public PDFTextUtil(FontInfo fontInfo)

  Main constructor.

  Parameters:
    `fontInfo` - the font catalog

Method Detail

### initValues

    protected void initValues()

  Resets the state fields.

  Overrides:
    `initValues` in class `PDFTextUtil`

### setFonts

    public void setFonts(Font[] fonts)

  Sets the current fonts for the text object. For every character, the suitable font will be selected.

  Parameters:
    `fonts` - the new fonts

### setFont

    public void setFont(Font font)

  Sets the current font for the text object.

  Parameters:
    `font` - the new font

### 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(java.lang.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

### writeTf

    public void writeTf(Font f)

  Writes a "Tf" command, setting a new current font.

  Parameters:
    `f` - the font to select

### selectFontForChar

    public Font selectFontForChar(char ch)

  Selects a font from the font list suitable to display the given character.

  Parameters:
    `ch` - the character
  Returns:
    the recommended Font to use

### writeTJChar

    public void writeTJChar(char ch)

  Writes a char to the "TJ-Buffer".

  Parameters:
    `ch` - the unmapped character

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.