|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.apache.batik.bridge.SVGGVTFont
Represents an SVG font.
| Constructor Summary | |
SVGGVTFont(float fontSize,
SVGFontFace fontFace,
java.lang.String[] glyphUnicodes,
java.lang.String[] glyphNames,
java.lang.String[] glyphLangs,
java.lang.String[] glyphOrientations,
java.lang.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(java.lang.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(java.text.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(java.lang.String str)
Checks whether or not this font can display the characters in the specified String. |
GVTGlyphVector |
createGlyphVector(java.awt.font.FontRenderContext frc,
char[] chars)
Returns a new GVTGlyphVector object for the specified array of characters. |
GVTGlyphVector |
createGlyphVector(java.awt.font.FontRenderContext frc,
java.text.CharacterIterator ci)
Returns a new GVTGlyphVector object for the characters in the specified character iterator. |
GVTGlyphVector |
createGlyphVector(java.awt.font.FontRenderContext frc,
int[] glyphCodes,
java.text.CharacterIterator ci)
Returns a new GVTGlyphVector object for the glyphs in the the glyph code array. |
GVTGlyphVector |
createGlyphVector(java.awt.font.FontRenderContext frc,
java.lang.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. |
int[] |
getGlyphCodesForName(java.lang.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(java.lang.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. |
GVTLineMetrics |
getLineMetrics(char[] chars,
int beginIndex,
int limit,
java.awt.font.FontRenderContext frc)
Returns the line metrics for the specified text. |
GVTLineMetrics |
getLineMetrics(java.text.CharacterIterator ci,
int beginIndex,
int limit,
java.awt.font.FontRenderContext frc)
Returns the line metrics for the specified text. |
GVTLineMetrics |
getLineMetrics(java.lang.String str,
java.awt.font.FontRenderContext frc)
Returns the line metrics for the specified text. |
GVTLineMetrics |
getLineMetrics(java.lang.String str,
int beginIndex,
int limit,
java.awt.font.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. |
java.lang.String |
toString()
Returns a string representation of this font. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SVGGVTFont(float fontSize,
SVGFontFace fontFace,
java.lang.String[] glyphUnicodes,
java.lang.String[] glyphNames,
java.lang.String[] glyphLangs,
java.lang.String[] glyphOrientations,
java.lang.String[] glyphForms,
BridgeContext ctx,
Element[] glyphElements,
Element missingGlyphElement,
Element[] hkernElements,
Element[] vkernElements,
Element textElement)
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.| Method Detail |
public float getHKern(int glyphCode1,
int glyphCode2)
getHKern in interface GVTFontglyphCode1 - The id of the first glyph.glyphCode2 - The id of the second glyph.
public float getVKern(int glyphCode1,
int glyphCode2)
getVKern in interface GVTFontglyphCode1 - The id of the first glyph.glyphCode2 - The id of the second glyph.public int[] getGlyphCodesForName(java.lang.String name)
name - The name of the glyph.public int[] getGlyphCodesForUnicode(java.lang.String unicode)
unicode - The unicode value of the glyph.public boolean canDisplayGivenName(java.lang.String name)
name - The name of the glyph to check.public boolean canDisplay(char c)
canDisplay in interface GVTFontc - The character to check.True - if the character can be displayed.
public int canDisplayUpTo(char[] text,
int start,
int limit)
canDisplayUpTo in interface GVTFonttext - 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.
public int canDisplayUpTo(java.text.CharacterIterator iter,
int start,
int limit)
canDisplayUpTo in interface GVTFontiter - 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.public int canDisplayUpTo(java.lang.String str)
canDisplayUpTo in interface GVTFontstr - The string containing the characters to check.
public GVTGlyphVector createGlyphVector(java.awt.font.FontRenderContext frc,
char[] chars)
createGlyphVector in interface GVTFontfrc - The current font render context.chars - The array of chars that the glyph vector will represent.
public GVTGlyphVector createGlyphVector(java.awt.font.FontRenderContext frc,
java.text.CharacterIterator ci)
createGlyphVector in interface GVTFontfrc - The current font render context.ci - The character iterator that the glyph vector will represent.
public GVTGlyphVector createGlyphVector(java.awt.font.FontRenderContext frc,
int[] glyphCodes,
java.text.CharacterIterator ci)
createGlyphVector in interface GVTFontfrc - The current font render context.glyphCodes - An array containin the ids of the glyphs that
the glyph vector will represent.
public GVTGlyphVector createGlyphVector(java.awt.font.FontRenderContext frc,
java.lang.String str)
createGlyphVector in interface GVTFontfrc - The current font render context.str - The string that the glyph vector will represent.public GVTFont deriveFont(float size)
deriveFont in interface GVTFontsize - The size of the new font.return - The new font object.
public GVTLineMetrics getLineMetrics(char[] chars,
int beginIndex,
int limit,
java.awt.font.FontRenderContext frc)
getLineMetrics in interface GVTFontchars - The character array containing the text.beginIndex - The index of the first character.limit - The limit of characters.frc - The current font render context.
public GVTLineMetrics getLineMetrics(java.text.CharacterIterator ci,
int beginIndex,
int limit,
java.awt.font.FontRenderContext frc)
getLineMetrics in interface GVTFontci - The character iterator containing the text.beginIndex - The index of the first character.limit - The limit of characters.frc - The current font render context.
public GVTLineMetrics getLineMetrics(java.lang.String str,
java.awt.font.FontRenderContext frc)
getLineMetrics in interface GVTFontstr - The string containing the text.frc - The current font render context.
public GVTLineMetrics getLineMetrics(java.lang.String str,
int beginIndex,
int limit,
java.awt.font.FontRenderContext frc)
getLineMetrics in interface GVTFontstr - The string containing the text.beginIndex - The index of the first character.limit - The limit of characters.frc - The current font render context.public float getSize()
getSize in interface GVTFontpublic java.lang.String toString()
toString in interface GVTFonttoString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||