public interface FontFile
| Modifier and Type | Interface and Description |
|---|---|
static class |
FontFile.ByteEncoding
Possible encoding format of string that was designed to work with this
font.
|
| Modifier and Type | Field and Description |
|---|---|
static long |
LAYOUT_NONE |
| 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 estr,
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() |
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 estr,
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 displayChar) |
java.lang.String |
toUnicode(java.lang.String displayText) |
static final long LAYOUT_NONE
java.awt.geom.Point2D echarAdvance(char ech)
FontFile deriveFont(java.awt.geom.AffineTransform at)
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)
boolean canDisplayEchar(char ech)
FontFile deriveFont(float pointsize)
deriveFont methods use this to make a clone and might make subsequent changes.CMap getToUnicode()
java.lang.String toUnicode(java.lang.String displayText)
java.lang.String toUnicode(char displayChar)
java.lang.String getFamily()
float getSize()
double getAscent()
double getDescent()
java.awt.geom.Rectangle2D getMaxCharBounds()
java.awt.geom.AffineTransform getTransform()
int getRights()
java.lang.String getName()
boolean isHinted()
true iff nfont has hinted outlines, which is Type 1 and TrueType is a sign of higher quality.int getNumGlyphs()
int getStyle()
char getSpaceEchar()
java.awt.geom.Rectangle2D getEstringBounds(java.lang.String estr,
int beginIndex,
int limit)
java.lang.String getFormat()
void drawEstring(java.awt.Graphics2D g,
java.lang.String estr,
float x,
float y,
long layout,
int mode,
java.awt.Color strokecolor)
java.awt.Shape getEstringOutline(java.lang.String estr,
float x,
float y)
estr - text to calculate glyph outline shapex - x coordinate to translate outline shape.y - y coordinate to translate outline shape.FontFile.ByteEncoding getByteEncoding()
java.net.URL getSource()