|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface FontFile
Font file interfaces. Common methods which encapsulate NFont and OFont font rendering libraries.
| Field Summary | |
|---|---|
static long |
LAYOUT_NONE
|
| Method Summary | |
|---|---|
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. |
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()
|
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()
|
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. |
boolean |
isOneByteEncoding()
|
java.lang.String |
toUnicode(char displayChar)
|
java.lang.String |
toUnicode(java.lang.String displayText)
|
| Field Detail |
|---|
static final long LAYOUT_NONE
| Method Detail |
|---|
java.awt.geom.Point2D echarAdvance(char ech)
FontFile deriveFont(java.awt.geom.AffineTransform at)
FontFile deriveFont(Encoding encoding,
CMap toUnicode)
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.
boolean isOneByteEncoding()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||