public class Font extends Object
Constructor and Description |
---|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize)
Create a font with specific family name, font style, and size.
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
Color color)
Create a font with specific family name, style, size, and front color.
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
Color color,
Locale language)
Create a font with specific family name, style, size, and color for a specific character.
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
Color color,
StyleTypeDefinitions.TextLinePosition textLinePosition)
Create a font with specific family name, style, size, front color and line position
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
Color color,
StyleTypeDefinitions.TextLinePosition textLinePosition,
Locale language)
Create a font with specific family name, style, size, color, and line position for a specific
character.
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
Locale language)
Create a font with specific family name, style, size for a specific character.
|
Font(String fontFamilyName,
StyleTypeDefinitions.FontStyle simpleFontStyle,
double fontSize,
StyleTypeDefinitions.TextLinePosition textLinePosition)
Create a font with specific family name, font style, size and line position.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Color |
getColor()
Return the font color
|
String |
getFamilyName()
Return the font family
|
protected String |
getFontName()
Return the font name
|
StyleTypeDefinitions.FontStyle |
getFontStyle()
Get the font style
|
double |
getSize()
Return the font size in measurement point(PT).
|
StyleTypeDefinitions.TextLinePosition |
getTextLinePosition()
Get the font text line position
|
void |
setColor(Color color)
Set the font color
|
void |
setFamilyName(String familyName)
Set the font family.
|
protected void |
setFontName(String fontName)
Set the font name
|
void |
setFontStyle(StyleTypeDefinitions.FontStyle simpleFontStyle)
Set the font style
|
void |
setSize(double size)
Set the font size.
|
void |
setTextLinePosition(StyleTypeDefinitions.TextLinePosition textLinePosition)
Set the font text line position
|
String |
toString() |
public Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizepublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, StyleTypeDefinitions.TextLinePosition textLinePosition)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizetextLinePosition
- - the line positionpublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, Color color)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizecolor
- - the front colorpublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, Color color, StyleTypeDefinitions.TextLinePosition textLinePosition)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizecolor
- - the front colortextLinePosition
- - the line positionpublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, Locale language)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the font sizelanguage
- - the character informationpublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, Color color, Locale language)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizecolor
- - the front colorlanguage
- - the character informationpublic Font(String fontFamilyName, StyleTypeDefinitions.FontStyle simpleFontStyle, double fontSize, Color color, StyleTypeDefinitions.TextLinePosition textLinePosition, Locale language)
fontFamilyName
- - the family namesimpleFontStyle
- - the font stylefontSize
- - the sizecolor
- - the front colortextLinePosition
- - the line positionlanguage
- - the character informationpublic String getFamilyName()
public void setFamilyName(String familyName)
Font family name is what you get from the font list in ODF editors.
familyName
- - the font family nameprotected String getFontName()
Note the font name might be different from font family name. A font family may have different font name definitions.
protected void setFontName(String fontName)
Note the font name might be different from font family name. A font family may have different font name definitions.
fontName
- - the font namepublic StyleTypeDefinitions.FontStyle getFontStyle()
public void setFontStyle(StyleTypeDefinitions.FontStyle simpleFontStyle)
simpleFontStyle
- - the font stylepublic StyleTypeDefinitions.TextLinePosition getTextLinePosition()
public void setTextLinePosition(StyleTypeDefinitions.TextLinePosition textLinePosition)
textLinePosition
- - the font text line positionpublic double getSize()
public void setSize(double size)
size
- - the font sizepublic Color getColor()
public void setColor(Color color)
color
- - the font colorCopyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.