Package com.adobe.fontengine.font
Interface SWFFontDescription
-
public interface SWFFontDescription
This interface contains methods that allow for the construction of a SWF DefineFont2 or DefineFont3 tag. When the mapping from character to glyph occurs in this interface, it is always a simple mapping. This means no OpenType processing occurs. Only BMP characters are handled, since that is all DefineFont2/3 can handle.Synchronization
Implementations of this interface are immutable after contruction and contains no mutable static data. It is therefore threadsafe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canDisplay(char c)
Return true iff the font has a non-notdef glyph associated with it.double
getAscent()
Get the ascent value for the font.java.lang.String
getCopyright()
Get the copyright string associated with the font.double
getDescent()
Get the descent for the font.double
getEmScale()
Get the native scaling units associated with the font.java.lang.String
getFamily()
Get the family name for the font.int
getFirstChar()
Get the lowest unicode scalar value that has a non-notdef glyph associated with it.java.lang.String
getFullName()
Get the Mac/English full name associated with the font, as required by the DefineFontName tag.double
getHorizontalAdvance(char ccode)
Get the advance width associated with the given character.int
getLastChar()
Get the largest BMP value that has a non-notdef glyph associated with it.double
getLineGap()
Get the line gap for the font.int
getNumGlyphs()
Get the number of glyphs in the font.void
getOutline(char ccode, OutlineConsumer consumer)
Get the outline associated with the given character.Permission
getPermissions()
Determine the permissions associated with this font.java.lang.String
getPostscriptName()
Get the postscript name associated with the font.java.lang.String
getSubFamily()
Get the subfamily name for the font.java.lang.String
getTrademark()
Get the trademark string associated with the font.boolean
isBold()
Return true iff the font is the bold member of a family.boolean
isItalic()
Return true iff the font is the italic member of a family.
-
-
-
Method Detail
-
getOutline
void getOutline(char ccode, OutlineConsumer consumer) throws UnsupportedFontException, InvalidFontException
Get the outline associated with the given character.
-
getHorizontalAdvance
double getHorizontalAdvance(char ccode) throws UnsupportedFontException, InvalidFontException
Get the advance width associated with the given character.
-
canDisplay
boolean canDisplay(char c) throws UnsupportedFontException, InvalidFontException
Return true iff the font has a non-notdef glyph associated with it.
-
getPermissions
Permission getPermissions() throws InvalidFontException, UnsupportedFontException
Determine the permissions associated with this font.
-
getFamily
java.lang.String getFamily() throws InvalidFontException, UnsupportedFontException
Get the family name for the font. Return null if none exists.
-
getSubFamily
java.lang.String getSubFamily() throws InvalidFontException, UnsupportedFontException
Get the subfamily name for the font. Return null if none exists.
-
getAscent
double getAscent() throws InvalidFontException, UnsupportedFontException
Get the ascent value for the font. The returned value is in emscale units. 0 is returned if no ascent value can be found, even through heuristics.
-
getDescent
double getDescent() throws InvalidFontException, UnsupportedFontException
Get the descent for the font. The returned value is in emscale units. 0 is returned if no descent value can be found, even through heuristics.
-
getLineGap
double getLineGap() throws InvalidFontException, UnsupportedFontException
Get the line gap for the font. The returned value is in emscale units. 0 is returned if no line gap value can be found, even through heuristics.
-
getFirstChar
int getFirstChar() throws InvalidFontException, UnsupportedFontException
Get the lowest unicode scalar value that has a non-notdef glyph associated with it.
-
getLastChar
int getLastChar() throws InvalidFontException, UnsupportedFontException
Get the largest BMP value that has a non-notdef glyph associated with it.
-
getNumGlyphs
int getNumGlyphs() throws InvalidFontException, UnsupportedFontException
Get the number of glyphs in the font.
-
isBold
boolean isBold() throws InvalidFontException, UnsupportedFontException
Return true iff the font is the bold member of a family.
-
isItalic
boolean isItalic() throws InvalidFontException, UnsupportedFontException
Return true iff the font is the italic member of a family.
-
getEmScale
double getEmScale() throws InvalidFontException, UnsupportedFontException
Get the native scaling units associated with the font. All metrics returned directly from this interface must be divided by this value to get to em.
-
getCopyright
java.lang.String getCopyright() throws InvalidFontException, UnsupportedFontException
Get the copyright string associated with the font. Return null if none exists.
-
getTrademark
java.lang.String getTrademark() throws InvalidFontException, UnsupportedFontException
Get the trademark string associated with the font. Return null if none exists.
-
getPostscriptName
java.lang.String getPostscriptName() throws InvalidFontException, UnsupportedFontException
Get the postscript name associated with the font. Return null if none exists.
-
getFullName
java.lang.String getFullName() throws InvalidFontException, UnsupportedFontException
Get the Mac/English full name associated with the font, as required by the DefineFontName tag. Return null if none exists.
-
-