|
DynamicPDF by ceTe Software | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cete.dynamicpdf.Resource com.cete.dynamicpdf.Font
public abstract class Font
Base class from which all fonts are derived.
Licensing:
This class is a DynamicPDF Generator Community Edition feature.
Constructor Summary | |
---|---|
protected |
Font(Encoder encoder)
Initializes a new instance of the Font class. |
protected |
Font(Encoder encoder,
long uid)
Initializes a new instance of the Font class. |
Method Summary | |
---|---|
abstract short |
getAscender()
Gets the ascender for the font. |
float |
getAscender(float fontSize)
Returns the ascender of the font in points for the given font size. |
float |
getBaseLine(float fontSize,
float leading)
Returns the baseline of the font in points for the given leading and font size. |
static Font |
getCeTeBullets()
Gets the CeTeBullets font for UnorderedList Bullets. |
static Font |
getCourier()
Gets the Courier core font with Latin 1 encoding. |
static Font |
getCourierBold()
Gets the Courier Bold core font with Latin 1 encoding. |
static Font |
getCourierBoldOblique()
Gets the Courier Bold Oblique core font with Latin 1 encoding. |
static Font |
getCourierOblique()
Gets the Courier Oblique core font with Latin 1 encoding. |
float |
getDefaultLeading(float fontSize)
Returns the default leading of the font in points for the given font size. |
abstract short |
getDescender()
Gets the descender for the font. |
float |
getDescender(float fontSize)
Returns the descender of the font in points for the given font size. |
Encoder |
getEncoder()
Gets the encoder for the font. |
java.lang.String |
getFormFontName()
Gets the four character name of the font. |
abstract int |
getGlyphWidth(char glyph)
Returns the mwidth of a glyph. |
static Font |
getHanyangSystemsGothicMedium()
Gets the Hanyang Systems Gothic Medium Korean font. |
static Font |
getHanyangSystemsShinMyeongJoMedium()
Gets the Hanyang Systems Shin MyeongJo Medium Korean font. |
static Font |
getHeiseiKakuGothicW5()
Gets the Heisei Kaku Gothic W5 Japanese font. |
static Font |
getHeiseiMinchoW3()
Gets the Heisei Mincho W3 Japanese font. |
static Font |
getHelvetica()
Gets the Helvetica core font with Latin 1 encoding. |
static Font |
getHelveticaBold()
Gets the Helvetica Bold core font with Latin 1 encoding. |
static Font |
getHelveticaBoldOblique()
Gets the Helvetica Bold Oblique core font with Latin 1 encoding. |
static Font |
getHelveticaOblique()
Gets the Helvetica Oblique core font with Latin 1 encoding. |
float |
getKernValue(char left,
char right)
Returns kerning space between two chars. |
abstract LineBreaker |
getLineBreaker()
Gets the default line breaker for the font. |
short |
getLineGap()
Gets the line gap for the font. |
float |
getLineGap(float fontSize)
Returns the line gap of the font in points for the given font size. |
static Font |
getMonotypeHeiMedium()
Gets the Monotype Hei Medium Chinese (traditional) font. |
static Font |
getMonotypeSungLight()
Gets the Monotype Sung Light Chinese (traditional) font. |
abstract java.lang.String |
getName()
Gets the name of the font. |
ResourceType |
getResourceType()
Gets the resource type. |
static Font |
getSinoTypeSongLight()
Gets the SinoType Song Light Chinese (simplified) font. |
static Font |
getSymbol()
Gets the Symbol core font. |
TextLineList |
getTextLines(char[] text,
float width,
float fontSize)
Gets the text broken in it lines as TextLineList . |
TextLineList |
getTextLines(char[] text,
float width,
float height,
float fontSize)
Gets the text broken in it lines as TextLineList . |
float |
getTextWidth(char[] text,
float fontSize)
Returns the width of the given text. |
float |
getTextWidth(java.lang.String text,
float fontSize)
Returns the width of the given text. |
static Font |
getTimesBold()
Gets the Times Bold core font with Latin 1 encoding. |
static Font |
getTimesBoldItalic()
Gets the Times Bold Italic core font with Latin 1 encoding. |
static Font |
getTimesItalic()
Gets the Times Italic core font with Latin 1 encoding. |
static Font |
getTimesRoman()
Gets the Times Roman core font with Latin 1 encoding. |
static Font |
getZapfDingbats()
Gets the Zapf Dingbats core font. |
boolean |
hasKerning()
Indicates whether the given font is having Kerning pairs or not. |
Methods inherited from class com.cete.dynamicpdf.Resource |
---|
draw, getRequiredPdfObjects, getUid, newUid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Font(Encoder encoder, long uid)
Font
class.
encoder
- Encoder for the font.uid
- long unique id for the font.protected Font(Encoder encoder)
Font
class.
encoder
- Encoder for the font.Method Detail |
---|
public java.lang.String getFormFontName()
public abstract short getDescender()
public float getDescender(float fontSize)
fontSize
- float font size to use for the calculation.
public abstract short getAscender()
public short getLineGap()
public abstract LineBreaker getLineBreaker()
public Encoder getEncoder()
public abstract java.lang.String getName()
public ResourceType getResourceType()
getResourceType
in class Resource
ResourceType
public abstract int getGlyphWidth(char glyph)
glyph
- char Glyph whose mwidth is to be returned.
public TextLineList getTextLines(char[] text, float width, float height, float fontSize)
TextLineList
.
text
- Character array containing the text.width
- Width to use when calculating the text lines.height
- Height to use when calculating the text lines.fontSize
- Font size to use when calculating the text lines.
TextLineList
public TextLineList getTextLines(char[] text, float width, float fontSize)
TextLineList
.
text
- Character array containing the text.width
- Width to use when calculating the text lines.fontSize
- Font size to use when calculating the text lines.
TextLineList
public float getTextWidth(char[] text, float fontSize)
text
- char[] array or text whose width is returned.fontSize
- float font size of text.
public float getTextWidth(java.lang.String text, float fontSize)
text
- String text whose width is returned.fontSize
- float font size of text.
public float getAscender(float fontSize)
fontSize
- float font size to use for the calculation.
public float getLineGap(float fontSize)
fontSize
- float font size to use for the calculation.
public float getDefaultLeading(float fontSize)
fontSize
- float font size to use for the calculation.
public float getBaseLine(float fontSize, float leading)
fontSize
- float font size to use for the calculation.leading
- float leading to use for the calculation.
public boolean hasKerning()
public float getKernValue(char left, char right)
left
- Char in left side of the pair.right
- Char in the right side of the pair.
public static Font getTimesRoman()
public static Font getTimesBold()
public static Font getTimesItalic()
public static Font getTimesBoldItalic()
public static Font getHelvetica()
public static Font getHelveticaBold()
public static Font getHelveticaOblique()
public static Font getHelveticaBoldOblique()
public static Font getCourier()
public static Font getCourierBold()
public static Font getCourierOblique()
public static Font getCourierBoldOblique()
public static Font getSymbol()
public static Font getZapfDingbats()
public static Font getHeiseiKakuGothicW5()
public static Font getHeiseiMinchoW3()
public static Font getHanyangSystemsGothicMedium()
public static Font getHanyangSystemsShinMyeongJoMedium()
public static Font getMonotypeHeiMedium()
public static Font getMonotypeSungLight()
public static Font getSinoTypeSongLight()
public static Font getCeTeBullets()
|
DynamicPDF by ceTe Software | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |