Package com.storedobject.pdf
Class PDFFont
java.lang.Object
com.storedobject.pdf.PDFFont
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumFont family.static enumFont styles.static enumLanguages. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intConstant used in font specification.static intConstant used in font specification.static intConstant used in font specification.static intConstant used in font specification.static intConstant used in font specification.static intConstant used in font specification.static intConstant used in font specification.static intConstant 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.FontFamilyGet the font family for the given name.Get the font family name.floatgetSize()Get the size.intgetStyle()Get the style.booleanisBold()Is this bold?booleanisItalic()Is this italic?booleanIs this strikethrough?booleanIs this underlined?voidsetColor(int red, int green, int blue) Set the color from RGB values.voidSet the color.voidSet the font family from the name given.voidsetSize(float size) Set the size.voidsetStyle(int style) Set the style.voidSet 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.
-