java.lang.Object
org.sejda.sambox.pdmodel.graphics.PDFontSetting
- All Implemented Interfaces:
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?
- Author:
- Ben Litchfield
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a blank font setting, font will be null, size will be 1.Constructs a font setting from an existing array. -
Method Summary
Modifier and TypeMethodDescriptiongetFont()This will get the font for this font setting.floatThis will get the size of the font.voidThis will set the font for this font setting.voidsetFontSize(float size) This will set the size of the font.
-
Constructor Details
-
PDFontSetting
public PDFontSetting()Creates a blank font setting, font will be null, size will be 1. -
PDFontSetting
Constructs a font setting from an existing array.- Parameters:
fs- The new font setting value.
-
-
Method Details
-
getCOSObject
- Specified by:
getCOSObjectin interfaceCOSObjectable- Returns:
- The
COSBasethat matches this Java object.
-
getFont
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
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.
-