FontFile.ByteEncoding| Modifier and Type | Field and Description |
|---|---|
protected float |
ascent |
protected java.util.Map<java.lang.Integer,java.lang.Float> |
cidWidths |
protected char[] |
cMap |
protected float |
descent |
protected Encoding |
encoding |
protected int |
firstCh |
protected float |
missingWidth |
protected CMap |
toUnicode |
protected float[] |
widths |
LAYOUT_NONE| Constructor and Description |
|---|
OFont(java.awt.Font awtFont) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDisplayEchar(char ech)
Can the character ch in the nfont's encoding be rendered?
|
FontFile |
deriveFont(java.awt.geom.AffineTransform at) |
FontFile |
deriveFont(Encoding encoding,
CMap toUnicode) |
FontFile |
deriveFont(float pointsize)
Creates nfont a new pointsize, assuming 72 ppi.
|
FontFile |
deriveFont(float[] widths,
int firstCh,
float missingWidth,
float ascent,
float descent,
char[] diff) |
FontFile |
deriveFont(java.util.Map<java.lang.Integer,java.lang.Float> widths,
int firstCh,
float missingWidth,
float ascent,
float descent,
char[] diff) |
void |
drawEstring(java.awt.Graphics2D g,
java.lang.String displayText,
float x,
float y,
long layout,
int mode,
java.awt.Color strokecolor) |
java.awt.geom.Point2D |
echarAdvance(char ech) |
double |
getAscent()
Returns maximum ascent glyphs above baseline.
|
FontFile.ByteEncoding |
getByteEncoding() |
char |
getCharDiff(char character)
Return the width of the given character
|
double |
getDescent()
Returns maximum descent of glyphs below baseline.
|
java.awt.geom.Rectangle2D |
getEstringBounds(java.lang.String estr,
int beginIndex,
int limit) |
java.awt.Shape |
getEstringOutline(java.lang.String displayText,
float x,
float y)
Get the glyph outline shape for the given estr translated to x,y.
|
java.lang.String |
getFamily()
Returns name of nfont, such as "Times".
|
java.lang.String |
getFormat()
Returns primary format, such as "Type1" or "OpenType".
|
java.awt.geom.Rectangle2D |
getMaxCharBounds()
Returns left in rectangle's x, ascent in y, width in width, height in height.
|
java.lang.String |
getName()
Returns name of nfont, such as "Times-Roman", which is different than the filename.
|
int |
getNumGlyphs()
Returns number of glyphs defined in nfont.
|
int |
getRights()
Returns nfont usage rights bit mask.
|
float |
getSize() |
java.net.URL |
getSource()
Gets the source url of the underlying file if any.
|
char |
getSpaceEchar()
Returns the character that seems to be used as a space in the current encoding, or NOTDEF_CHAR if no such character.
|
int |
getStyle()
Gets the style associated with the font.
|
CMap |
getToUnicode() |
java.awt.geom.AffineTransform |
getTransform()
Returns a copy of the transform associated with this font file.
|
boolean |
isHinted()
Returns
true iff nfont has hinted outlines, which is Type 1 and TrueType is a sign of higher quality. |
java.lang.String |
toUnicode(char c1) |
java.lang.String |
toUnicode(java.lang.String displayText) |
protected float[] widths
protected java.util.Map<java.lang.Integer,java.lang.Float> cidWidths
protected float missingWidth
protected int firstCh
protected float ascent
protected float descent
protected Encoding encoding
protected CMap toUnicode
protected char[] cMap
public FontFile deriveFont(Encoding encoding, CMap toUnicode)
deriveFont in interface FontFilepublic FontFile deriveFont(float[] widths, int firstCh, float missingWidth, float ascent, float descent, char[] diff)
deriveFont in interface FontFilepublic FontFile deriveFont(java.util.Map<java.lang.Integer,java.lang.Float> widths, int firstCh, float missingWidth, float ascent, float descent, char[] diff)
deriveFont in interface FontFilepublic FontFile deriveFont(java.awt.geom.AffineTransform at)
deriveFont in interface FontFilepublic boolean canDisplayEchar(char ech)
FontFilecanDisplayEchar in interface FontFilepublic FontFile deriveFont(float pointsize)
FontFilederiveFont methods use this to make a clone and might make subsequent changes.deriveFont in interface FontFilepublic java.awt.geom.Point2D echarAdvance(char ech)
echarAdvance in interface FontFilepublic char getCharDiff(char character)
character - character to retreive width ofcharacterpublic CMap getToUnicode()
getToUnicode in interface FontFilepublic int getStyle()
FontFilepublic java.lang.String getFamily()
FontFilepublic double getAscent()
FontFilepublic double getDescent()
FontFilegetDescent in interface FontFilepublic java.awt.geom.Rectangle2D getMaxCharBounds()
FontFilegetMaxCharBounds in interface FontFilepublic java.awt.geom.AffineTransform getTransform()
FontFilegetTransform in interface FontFilepublic int getRights()
FontFilepublic java.lang.String getName()
FontFilepublic boolean isHinted()
FontFiletrue iff nfont has hinted outlines, which is Type 1 and TrueType is a sign of higher quality.public int getNumGlyphs()
FontFilegetNumGlyphs in interface FontFilepublic char getSpaceEchar()
FontFilegetSpaceEchar in interface FontFilepublic java.awt.geom.Rectangle2D getEstringBounds(java.lang.String estr,
int beginIndex,
int limit)
getEstringBounds in interface FontFilepublic java.lang.String getFormat()
FontFilepublic void drawEstring(java.awt.Graphics2D g,
java.lang.String displayText,
float x,
float y,
long layout,
int mode,
java.awt.Color strokecolor)
drawEstring in interface FontFilepublic java.lang.String toUnicode(java.lang.String displayText)
public FontFile.ByteEncoding getByteEncoding()
getByteEncoding in interface FontFilepublic java.awt.Shape getEstringOutline(java.lang.String displayText,
float x,
float y)
FontFilegetEstringOutline in interface FontFiledisplayText - text to calculate glyph outline shapex - x coordinate to translate outline shape.y - y coordinate to translate outline shape.