Package com.storedobject.pdf
Class PDFFont
java.lang.Object
com.storedobject.pdf.PDFFont
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Font family.static enum
Font styles.static enum
Languages. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic int
Constant used in font specification.static int
Constant used in font specification.static int
Constant used in font specification.static int
Constant used in font specification.static int
Constant used in font specification.static int
Constant used in font specification.static int
Constant used in font specification.static int
Constant used in font specification. -
Constructor Summary
ConstructorsConstructorDescriptionPDFFont()
Constructor.Construct from another font.PDFFont
(PDFFont.FontFamily family) Constructor.PDFFont
(PDFFont.FontFamily family, float size) Constructor.PDFFont
(PDFFont.FontFamily family, float size, int style) Constructor.PDFFont
(PDFFont.FontFamily family, float size, int style, PDFColor color) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetColor()
Get the color.Get the font family.static PDFFont.FontFamily
Get the font family for the given name.Get the font family name.float
getSize()
Get the size.int
getStyle()
Get the style.boolean
isBold()
Is this bold?boolean
isItalic()
Is this italic?boolean
Is this strikethrough?boolean
Is this underlined?void
setColor
(int red, int green, int blue) Set the color from RGB values.void
Set the color.void
Set the font family from the name given.void
setSize
(float size) Set the size.void
setStyle
(int style) Set the style.void
Set the style via style name.
-
Field Details
-
NORMAL
public static int NORMALConstant used in font specification. -
BOLD
public static int BOLDConstant used in font specification. -
ITALIC
public static int ITALICConstant used in font specification. -
UNDERLINE
public static int UNDERLINEConstant used in font specification. -
STRIKE_THROUGH
public static int STRIKE_THROUGHConstant used in font specification. -
BOLD_ITALIC
public static int BOLD_ITALICConstant used in font specification. -
UNDEFINED
public static int UNDEFINEDConstant used in font specification. -
DEFAULTSIZE
public static int DEFAULTSIZEConstant used in font specification.
-
-
Constructor Details
-
PDFFont
-
PDFFont
Constructor.- Parameters:
family
- Family.size
- Size.style
- Style.color
- Color.
-
PDFFont
Constructor.- Parameters:
family
- Family.size
- Size.style
- Style.
-
PDFFont
Constructor.- Parameters:
family
- Family.size
- Size.
-
PDFFont
-
PDFFont
public PDFFont()Constructor.
-
-
Method Details
-
getSize
public float getSize()Get the size.- Returns:
- Size.
-
setSize
public void setSize(float size) Set the size.- Parameters:
size
- Size to set.
-
getStyle
public int getStyle()Get the style.- Returns:
- Style.
-
setColor
-
setColor
public void setColor(int red, int green, int blue) Set the color from RGB values.- Parameters:
red
- Red value.green
- Green value.blue
- Blue value.
-
getColor
-
getFamily
-
getFamily
Get the font family for the given name.- Parameters:
name
- Name.- Returns:
- Font family.
-
getFamilyName
-
setFamily
Set the font family from the name given.- Parameters:
name
- Name of the font family to set.
-
isBold
public boolean isBold()Is this bold?- Returns:
- True/false.
-
isItalic
public boolean isItalic()Is this italic?- Returns:
- True/false.
-
isUnderlined
public boolean isUnderlined()Is this underlined?- Returns:
- True/false.
-
isStrikethrough
public boolean isStrikethrough()Is this strikethrough?- Returns:
- True/false.
-
setStyle
public void setStyle(int style) Set the style.- Parameters:
style
- Style.
-
setStyle
Set the style via style name.- Parameters:
style
- Name of the style to set.
-