org.apache.batik.bridge
public final class SVGGVTFont extends Object implements GVTFont, SVGConstants
Field Summary | |
---|---|
static Attribute | PAINT_INFO |
Constructor Summary | |
---|---|
SVGGVTFont(float fontSize, GVTFontFace fontFace, String[] glyphUnicodes, String[] glyphNames, String[] glyphLangs, String[] glyphOrientations, String[] glyphForms, BridgeContext ctx, Element[] glyphElements, Element missingGlyphElement, Element[] hkernElements, Element[] vkernElements, Element textElement)
Constructs a new SVGGVTFont of the specified size.
|
Method Summary | |
---|---|
boolean | canDisplay(char c)
Indicates whether or not the specified character can be
displayed by this font.
|
boolean | canDisplayGivenName(String name)
Indicates whether or not the specified glyph can be displayed by this
font.
|
int | canDisplayUpTo(char[] text, int start, int limit)
Checks whether this Font can display the characters in the
specified character array starting at start and ending at limit.
|
int | canDisplayUpTo(CharacterIterator iter, int start, int limit)
Checks whether this Font can display the characters in the
specified character iterator starting at start and ending at limit.
|
int | canDisplayUpTo(String str)
Checks whether or not this font can display the characters in the
specified String.
|
GVTGlyphVector | createGlyphVector(FontRenderContext frc, char[] chars)
Returns a new GVTGlyphVector object for the specified array of
characters.
|
GVTGlyphVector | createGlyphVector(FontRenderContext frc, CharacterIterator ci)
Returns a new GVTGlyphVector object for the characters in the
specified character iterator.
|
GVTGlyphVector | createGlyphVector(FontRenderContext frc, int[] glyphCodes, CharacterIterator ci)
Returns a new GVTGlyphVector object for the glyphs in the
the glyph code array.
|
GVTGlyphVector | createGlyphVector(FontRenderContext frc, String str)
Returns a new GVTGlyphVector object for the specified String.
|
GVTFont | deriveFont(float size)
Creates a new GVTFont object by replicating this font object and
applying a new size to it.
|
String | getFamilyName() |
int[] | getGlyphCodesForName(String name)
Returns an array of glyph codes (unique ids) of the glyphs with the
specified name (there may be more than one).
|
int[] | getGlyphCodesForUnicode(String unicode)
Returns an array of glyph codes (unique ids) of the glyphs with the
specified unicode value (there may be more than one).
|
float | getHKern(int glyphCode1, int glyphCode2)
Returns the horizontal kerning value for the specified glyph pair.
|
protected GVTLineMetrics | getLineMetrics(int beginIndex, int limit) |
GVTLineMetrics | getLineMetrics(char[] chars, int beginIndex, int limit, FontRenderContext frc)
Returns the line metrics for the specified text.
|
GVTLineMetrics | getLineMetrics(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc)
Returns the line metrics for the specified text.
|
GVTLineMetrics | getLineMetrics(String str, FontRenderContext frc)
Returns the line metrics for the specified text.
|
GVTLineMetrics | getLineMetrics(String str, int beginIndex, int limit, FontRenderContext frc)
Returns the line metrics for the specified text.
|
float | getSize()
Returns the size of this font.
|
float | getVKern(int glyphCode1, int glyphCode2)
Returns the vertical kerning value for the specified glyph pair.
|
String | toString()
Returns a string representation of this font.
|
Parameters: fontSize The size of the font to create. fontFace The font face that describes the font. glyphUnicodes An array containing the unicode values for all the glyphs this font can display. glyphNames An array containing the names of all the glyphs this font can display. ctx The bridge context. glyphElements An array containing the children glyph elements of the SVG font. missingGlyphElement The missing glyph element for this font. hkernElements An array containing all hkern elements for this font. vkernElements An array containing all vkern elements for this font. textElement The text element that contains the text to be rendered using this font.
Parameters: c The character to check.
Returns: true if the character can be displayed.
Parameters: name The name of the glyph to check.
Returns: true if the glyph can be displayed.
Parameters: text An array containing the characters to check. start The index of the first character to check. limit The index of the last character to check.
Returns: The index of the first character it can't display or -1 if it can display the whole string.
Parameters: iter The iterator containing the characters to check. start The index of the first character to check. limit The index of the last character to check.
Returns: The index of the first character it can't display or -1 if it can display the whole string.
Parameters: str The string containing the characters to check.
Returns: The index of the first character it can't display or -1 if it can display the whole string.
Parameters: frc The current font render context. chars The array of chars that the glyph vector will represent.
Returns: The new glyph vector.
Parameters: frc The current font render context. ci The character iterator that the glyph vector will represent.
Returns: The new glyph vector.
Parameters: frc The current font render context. glyphCodes An array containin the ids of the glyphs that the glyph vector will represent.
Returns: The new glyph vector.
Parameters: frc The current font render context. str The string that the glyph vector will represent.
Returns: The new glyph vector.
Parameters: size The size of the new font.
Returns: The new font object.
Parameters: name The name of the glyph.
Returns: An array of matching glyph codes. This may be empty.
Parameters: unicode The unicode value of the glyph.
Returns: An array of matching glyph codes. This may be empty.
Parameters: glyphCode1 The id of the first glyph. glyphCode2 The id of the second glyph.
Returns: The horizontal kerning value.
Parameters: chars The character array containing the text. beginIndex The index of the first character. limit The limit of characters. frc The current font render context.
Returns: The new GVTLineMetrics object.
Parameters: ci The character iterator containing the text. beginIndex The index of the first character. limit The limit of characters. frc The current font render context.
Returns: The new GVTLineMetrics object.
Parameters: str The string containing the text. frc The current font render context.
Returns: The new GVTLineMetrics object.
Parameters: str The string containing the text. beginIndex The index of the first character. limit The limit of characters. frc The current font render context.
Returns: The new GVTLineMetrics object.
Returns: The font size.
Parameters: glyphCode1 The id of the first glyph. glyphCode2 The id of the second glyph.
Returns: The vertical kerning value.
Returns: A string representation of this font.