final class WCFontImpl extends WCFont
| Modifier and Type | Field and Description |
|---|---|
private PGFont |
font |
private static java.util.HashMap<java.lang.String,java.lang.String> |
FONT_MAP |
private static java.util.logging.Logger |
log |
private FontStrike |
strike |
| Constructor and Description |
|---|
WCFontImpl(PGFont font) |
| Modifier and Type | Method and Description |
|---|---|
WCFont |
deriveFont(float size) |
float |
getAscent() |
float |
getCapHeight() |
float |
getDescent() |
(package private) static WCFont |
getFont(java.lang.String name,
boolean bold,
boolean italic,
float size) |
private FontStrike |
getFontStrike() |
float[] |
getGlyphBoundingBox(int glyph) |
int[] |
getGlyphCodes(char[] chars) |
WCGlyphBuffer |
getGlyphsAndAdvances(java.lang.String str,
int from,
int to,
boolean rtl) |
double |
getGlyphWidth(int glyph) |
float |
getLineGap() |
float |
getLineSpacing() |
int |
getOffsetForPosition(java.lang.String str,
float x) |
java.lang.Object |
getPlatformFont() |
double[] |
getStringBounds(java.lang.String str,
int from,
int to,
boolean rtl) |
double |
getStringWidth(java.lang.String str) |
float |
getXHeight() |
boolean |
hasUniformLineMetrics() |
private static final java.util.logging.Logger log
private static final java.util.HashMap<java.lang.String,java.lang.String> FONT_MAP
private final PGFont font
private FontStrike strike
WCFontImpl(PGFont font)
static WCFont getFont(java.lang.String name, boolean bold, boolean italic, float size)
public WCFont deriveFont(float size)
deriveFont in class WCFontpublic int getOffsetForPosition(java.lang.String str,
float x)
getOffsetForPosition in class WCFontpublic WCGlyphBuffer getGlyphsAndAdvances(java.lang.String str, int from, int to, boolean rtl)
getGlyphsAndAdvances in class WCFontprivate FontStrike getFontStrike()
public double getGlyphWidth(int glyph)
getGlyphWidth in class WCFontpublic float[] getGlyphBoundingBox(int glyph)
getGlyphBoundingBox in class WCFontpublic float getXHeight()
getXHeight in class WCFontpublic int[] getGlyphCodes(char[] chars)
getGlyphCodes in class WCFontpublic double getStringWidth(java.lang.String str)
getStringWidth in class WCFontpublic double[] getStringBounds(java.lang.String str,
int from,
int to,
boolean rtl)
getStringBounds in class WCFontpublic float getDescent()
getDescent in class WCFontpublic float getLineSpacing()
getLineSpacing in class WCFontpublic float getLineGap()
getLineGap in class WCFontpublic boolean hasUniformLineMetrics()
hasUniformLineMetrics in class WCFontpublic java.lang.Object getPlatformFont()
getPlatformFont in class WCFontpublic float getCapHeight()
getCapHeight in class WCFont