Class MetaFont
- java.lang.Object
-
- com.itextpdf.kernel.pdf.canvas.wmf.MetaObject
-
- com.itextpdf.kernel.pdf.canvas.wmf.MetaFont
-
public class MetaFont extends MetaObject
A Meta Font.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) float
angle
(package private) int
bold
(package private) static int
BOLDTHRESHOLD
(package private) int
charset
(package private) static int
DEFAULT_PITCH
(package private) FontEncoding
encoding
(package private) static int
ETO_CLIPPED
(package private) static int
ETO_OPAQUE
(package private) java.lang.String
faceName
(package private) static int
FF_DECORATIVE
(package private) static int
FF_DONTCARE
(package private) static int
FF_MODERN
(package private) static int
FF_ROMAN
(package private) static int
FF_SCRIPT
(package private) static int
FF_SWISS
(package private) static int
FIXED_PITCH
(package private) FontProgram
font
(package private) static java.lang.String[]
fontNames
(package private) int
height
(package private) int
italic
(package private) static int
MARKER_BOLD
(package private) static int
MARKER_COURIER
(package private) static int
MARKER_HELVETICA
(package private) static int
MARKER_ITALIC
(package private) static int
MARKER_SYMBOL
(package private) static int
MARKER_TIMES
(package private) static int
NAME_SIZE
(package private) int
pitchAndFamily
(package private) boolean
strikeout
(package private) boolean
underline
(package private) static int
VARIABLE_PITCH
-
Fields inherited from class com.itextpdf.kernel.pdf.canvas.wmf.MetaObject
META_BRUSH, META_FONT, META_NOT_SUPPORTED, META_PEN
-
-
Constructor Summary
Constructors Constructor Description MetaFont()
Creates a MetaFont instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
getAngle()
Returns the angle of the MetaFont.FontEncoding
getEncoding()
Returns the encoding used in the MetaFont.FontProgram
getFont()
Returns the Font.float
getFontSize(MetaState state)
Returns the font size.void
init(InputMeta in)
Initializes the MetaFont instance.boolean
isStrikeout()
Returns a boolean value indicating if a font has a strikeout.boolean
isUnderline()
Returns a boolean value indicating if the font is underlined or not.-
Methods inherited from class com.itextpdf.kernel.pdf.canvas.wmf.MetaObject
getType
-
-
-
-
Field Detail
-
fontNames
static final java.lang.String[] fontNames
-
MARKER_BOLD
static final int MARKER_BOLD
- See Also:
- Constant Field Values
-
MARKER_ITALIC
static final int MARKER_ITALIC
- See Also:
- Constant Field Values
-
MARKER_COURIER
static final int MARKER_COURIER
- See Also:
- Constant Field Values
-
MARKER_HELVETICA
static final int MARKER_HELVETICA
- See Also:
- Constant Field Values
-
MARKER_TIMES
static final int MARKER_TIMES
- See Also:
- Constant Field Values
-
MARKER_SYMBOL
static final int MARKER_SYMBOL
- See Also:
- Constant Field Values
-
DEFAULT_PITCH
static final int DEFAULT_PITCH
- See Also:
- Constant Field Values
-
FIXED_PITCH
static final int FIXED_PITCH
- See Also:
- Constant Field Values
-
VARIABLE_PITCH
static final int VARIABLE_PITCH
- See Also:
- Constant Field Values
-
FF_DONTCARE
static final int FF_DONTCARE
- See Also:
- Constant Field Values
-
FF_ROMAN
static final int FF_ROMAN
- See Also:
- Constant Field Values
-
FF_SWISS
static final int FF_SWISS
- See Also:
- Constant Field Values
-
FF_MODERN
static final int FF_MODERN
- See Also:
- Constant Field Values
-
FF_SCRIPT
static final int FF_SCRIPT
- See Also:
- Constant Field Values
-
FF_DECORATIVE
static final int FF_DECORATIVE
- See Also:
- Constant Field Values
-
BOLDTHRESHOLD
static final int BOLDTHRESHOLD
- See Also:
- Constant Field Values
-
NAME_SIZE
static final int NAME_SIZE
- See Also:
- Constant Field Values
-
ETO_OPAQUE
static final int ETO_OPAQUE
- See Also:
- Constant Field Values
-
ETO_CLIPPED
static final int ETO_CLIPPED
- See Also:
- Constant Field Values
-
height
int height
-
angle
float angle
-
bold
int bold
-
italic
int italic
-
underline
boolean underline
-
strikeout
boolean strikeout
-
charset
int charset
-
pitchAndFamily
int pitchAndFamily
-
faceName
java.lang.String faceName
-
font
FontProgram font
-
encoding
FontEncoding encoding
-
-
Method Detail
-
init
public void init(InputMeta in) throws java.io.IOException
Initializes the MetaFont instance.- Parameters:
in
- InputMeta containing the WMF data- Throws:
java.io.IOException
- anIOException
-
getFont
public FontProgram getFont() throws java.io.IOException
Returns the Font.- Returns:
- the font
- Throws:
java.io.IOException
- anIOException
-
getEncoding
public FontEncoding getEncoding()
Returns the encoding used in the MetaFont.- Returns:
- the font encoding
-
getAngle
public float getAngle()
Returns the angle of the MetaFont.- Returns:
- the angle
-
isUnderline
public boolean isUnderline()
Returns a boolean value indicating if the font is underlined or not.- Returns:
- true if the font is underlined
-
isStrikeout
public boolean isStrikeout()
Returns a boolean value indicating if a font has a strikeout.- Returns:
- true if the font set strikeout
-
getFontSize
public float getFontSize(MetaState state)
Returns the font size.- Parameters:
state
- the MetaState- Returns:
- font size
-
-