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 WCFont
public int getOffsetForPosition(java.lang.String str, float x)
getOffsetForPosition
in class WCFont
public WCGlyphBuffer getGlyphsAndAdvances(java.lang.String str, int from, int to, boolean rtl)
getGlyphsAndAdvances
in class WCFont
private FontStrike getFontStrike()
public double getGlyphWidth(int glyph)
getGlyphWidth
in class WCFont
public float[] getGlyphBoundingBox(int glyph)
getGlyphBoundingBox
in class WCFont
public float getXHeight()
getXHeight
in class WCFont
public int[] getGlyphCodes(char[] chars)
getGlyphCodes
in class WCFont
public double getStringWidth(java.lang.String str)
getStringWidth
in class WCFont
public double[] getStringBounds(java.lang.String str, int from, int to, boolean rtl)
getStringBounds
in class WCFont
public float getDescent()
getDescent
in class WCFont
public float getLineSpacing()
getLineSpacing
in class WCFont
public float getLineGap()
getLineGap
in class WCFont
public boolean hasUniformLineMetrics()
hasUniformLineMetrics
in class WCFont
public java.lang.Object getPlatformFont()
getPlatformFont
in class WCFont
public float getCapHeight()
getCapHeight
in class WCFont