|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.bridge.SVGGVTFont
public final class SVGGVTFont
Represents an SVG font.
Field Summary | |
---|---|
static AttributedCharacterIterator.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()
Returns the font family name of this font. |
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. |
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. |
protected GVTLineMetrics |
getLineMetrics(int beginIndex,
int limit)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final AttributedCharacterIterator.Attribute PAINT_INFO
Constructor Detail |
---|
public 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)
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 GVTFont
glyphCode1
- The id of the first glyph.glyphCode2
- The id of the second glyph.
public float getVKern(int glyphCode1, int glyphCode2)
getVKern
in interface GVTFont
glyphCode1
- The id of the first glyph.glyphCode2
- The id of the second glyph.
public int[] getGlyphCodesForName(String name)
name
- The name of the glyph.
public int[] getGlyphCodesForUnicode(String unicode)
unicode
- The unicode value of the glyph.
public boolean canDisplayGivenName(String name)
name
- The name of the glyph to check.
public boolean canDisplay(char c)
canDisplay
in interface GVTFont
c
- The character to check.
public int canDisplayUpTo(char[] text, int start, int limit)
canDisplayUpTo
in interface GVTFont
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.
public int canDisplayUpTo(CharacterIterator iter, int start, int limit)
canDisplayUpTo
in interface GVTFont
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.
public int canDisplayUpTo(String str)
canDisplayUpTo
in interface GVTFont
str
- The string containing the characters to check.
public GVTGlyphVector createGlyphVector(FontRenderContext frc, char[] chars)
createGlyphVector
in interface GVTFont
frc
- The current font render context.chars
- The array of chars that the glyph vector will represent.
public GVTGlyphVector createGlyphVector(FontRenderContext frc, CharacterIterator ci)
createGlyphVector
in interface GVTFont
frc
- The current font render context.ci
- The character iterator that the glyph vector will represent.
public GVTGlyphVector createGlyphVector(FontRenderContext frc, int[] glyphCodes, CharacterIterator ci)
createGlyphVector
in interface GVTFont
frc
- The current font render context.glyphCodes
- An array containin the ids of the glyphs that
the glyph vector will represent.
public GVTGlyphVector createGlyphVector(FontRenderContext frc, String str)
createGlyphVector
in interface GVTFont
frc
- The current font render context.str
- The string that the glyph vector will represent.
public GVTFont deriveFont(float size)
deriveFont
in interface GVTFont
size
- The size of the new font.
public String getFamilyName()
GVTFont
getFamilyName
in interface GVTFont
protected GVTLineMetrics getLineMetrics(int beginIndex, int limit)
public GVTLineMetrics getLineMetrics(char[] chars, int beginIndex, int limit, FontRenderContext frc)
getLineMetrics
in interface GVTFont
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.
public GVTLineMetrics getLineMetrics(CharacterIterator ci, int beginIndex, int limit, FontRenderContext frc)
getLineMetrics
in interface GVTFont
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.
public GVTLineMetrics getLineMetrics(String str, FontRenderContext frc)
getLineMetrics
in interface GVTFont
str
- The string containing the text.frc
- The current font render context.
public GVTLineMetrics getLineMetrics(String str, int beginIndex, int limit, FontRenderContext frc)
getLineMetrics
in interface GVTFont
str
- 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 GVTFont
public String toString()
toString
in interface GVTFont
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |