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

## com.lowagie.text.pdf
Class FontDetails

    java.lang.Object
      com.lowagie.text.pdf.FontDetails

     class FontDetails

extends Object

Each font in the document will have an instance of this class where the characters used will be represented.

Author:
  Paulo Soares (psoares@consiste.pt)

Field Summary
`(package private) BaseFont` | `baseFont` The font
`(package private) CJKFont` | `cjkFont`
`(package private) IntHashtable` | `cjkTag`
`(package private) PdfName` | `fontName` The font name that appears in the document body stream
`(package private) int` | `fontType` The font type
`(package private) PdfIndirectReference` | `indirectReference` The indirect reference to this font
`(package private) HashMap` | `longTag` The map used with double byte encodings.
`(package private) byte[]` | `shortTag` The array used with single byte encodings
`protected boolean` | `subset` Indicates if all the glyphs and widths for that particular encoding should be included in the document.
`(package private) boolean` | `symbolic` `true` if the font is symbolic
`(package private) TrueTypeFontUnicode` | `ttu` The font if its an instance of `TrueTypeFontUnicode`

Constructor Summary
`FontDetails(PdfName fontName, PdfIndirectReference indirectReference, BaseFont baseFont)` Each font used in a document has an instance of this class.

Method Summary
`(package private) byte[]` | `convertToBytes(String text)` Converts the text into bytes to be placed in the document.
`(package private) BaseFont` | `getBaseFont()` Gets the `BaseFont` of this font.
`(package private) PdfName` | `getFontName()` Gets the font name as it appears in the document body.
`(package private) PdfIndirectReference` | `getIndirectReference()` Gets the indirect reference to this font.
`boolean` | `isSubset()` Indicates if all the glyphs and widths for that particular encoding should be included in the document.
`void` | `setSubset(boolean subset)` Indicates if all the glyphs and widths for that particular encoding should be included in the document.
`(package private) void` | `writeFont(PdfWriter writer)` Writes the font definition to the document.

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

Field Detail

### indirectReference

    PdfIndirectReference indirectReference

  The indirect reference to this font

### fontName

    PdfName fontName

  The font name that appears in the document body stream

### baseFont

    BaseFont baseFont

  The font

### ttu

    TrueTypeFontUnicode ttu

  The font if its an instance of `TrueTypeFontUnicode`

### cjkFont

    CJKFont cjkFont

### shortTag

    byte[] shortTag

  The array used with single byte encodings

### longTag

    HashMap longTag

  The map used with double byte encodings. The key is Integer(glyph) and the value is int[]{glyph, width, Unicode code}

### cjkTag

    IntHashtable cjkTag

### fontType

    int fontType

  The font type

### symbolic

    boolean symbolic

  `true` if the font is symbolic

### subset

    protected boolean subset

  Indicates if all the glyphs and widths for that particular encoding should be included in the document.

Constructor Detail

### FontDetails

    FontDetails(PdfName fontName,
                PdfIndirectReference indirectReference,
                BaseFont baseFont)

  Each font used in a document has an instance of this class. This class stores the characters used in the document and other specifics unique to the current working document.

  Parameters:
    `fontName` - the font name
    `indirectReference` - the indirect reference to the font
    `baseFont` - the `BaseFont`

Method Detail

### getIndirectReference

    PdfIndirectReference getIndirectReference()

  Gets the indirect reference to this font.

  Returns:
    the indirect reference to this font

### getFontName

    PdfName getFontName()

  Gets the font name as it appears in the document body.

  Returns:
    the font name

### getBaseFont

    BaseFont getBaseFont()

  Gets the `BaseFont` of this font.

  Returns:
    the `BaseFont` of this font

### convertToBytes

    byte[] convertToBytes(String text)

  Converts the text into bytes to be placed in the document. The conversion is done according to the font and the encoding and the characters used are stored.

  Parameters:
    `text` - the text to convert
  Returns:
    the conversion

### writeFont

    void writeFont(PdfWriter writer)

  Writes the font definition to the document.

  Parameters:
    `writer` - the `PdfWriter` of this document

### isSubset

    public boolean isSubset()

  Indicates if all the glyphs and widths for that particular encoding should be included in the document.

  Returns:
    `false` to include all the glyphs and widths.

### setSubset

    public void setSubset(boolean subset)

  Indicates if all the glyphs and widths for that particular encoding should be included in the document. Set to `false` to include all.

  Parameters:
    `subset` - new value of property subset

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