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

## org.pdfbox.pdmodel.graphics
Class PDFontSetting

    java.lang.Object
      org.pdfbox.pdmodel.graphics.PDFontSetting

All Implemented Interfaces:
  COSObjectable

public class PDFontSetting
extends Object
implements COSObjectable

This class represents a font setting used for the graphics state. A font setting is a font and a font size. Maybe there is a better name for this?

Version:
  $Revision: 1.3 $
Author:
  Ben Litchfield (ben@csh.rit.edu)

Constructor Summary
`PDFontSetting()` Creates a blank font setting, font will be null, size will be 1.
`PDFontSetting(COSArray fs)` Constructs a font setting from an existing array.

Method Summary
`COSBase` | `getCOSObject()` Convert this standard java object to a COS object.
`PDFont` | `getFont()` This will get the font for this font setting.
`float` | `getFontSize()` This will get the size of the font.
`void` | `setFont(PDFont font)` This will set the font for this font setting.
`void` | `setFontSize(float size)` This will set the size of the font.

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

Constructor Detail

### PDFontSetting

    public PDFontSetting()

  Creates a blank font setting, font will be null, size will be 1.

### PDFontSetting

    public PDFontSetting(COSArray fs)

  Constructs a font setting from an existing array.

Parameters:
  `fs` - The new font setting value.

Method Detail

### getCOSObject

    public COSBase getCOSObject()

  Description copied from interface: `COSObjectable`
  Convert this standard java object to a COS object.

  Specified by:
    `getCOSObject` in interface `COSObjectable`
  Returns:
    The cos object that matches this Java object.
  See Also:
    `COSObjectable.getCOSObject()`

### getFont

    public PDFont getFont()
                   throws IOException

  This will get the font for this font setting.

  Returns:
    The font for this setting of null if one was not found.
  Throws:
    `IOException` - If there is an error getting the font.

### setFont

    public void setFont(PDFont font)

  This will set the font for this font setting.

  Parameters:
    `font` - The new font.

### getFontSize

    public float getFontSize()

  This will get the size of the font.

  Returns:
    The size of the font.

### setFontSize

    public void setFontSize(float size)

  This will set the size of the font.

  Parameters:
    `size` - The new size of the font.

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