Package com.adobe.fontengine.font
Interface SWFFontDescription
-
public interface SWFFontDescriptionThis 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 booleancanDisplay(char c)Return true iff the font has a non-notdef glyph associated with it.doublegetAscent()Get the ascent value for the font.java.lang.StringgetCopyright()Get the copyright string associated with the font.doublegetDescent()Get the descent for the font.doublegetEmScale()Get the native scaling units associated with the font.java.lang.StringgetFamily()Get the family name for the font.intgetFirstChar()Get the lowest unicode scalar value that has a non-notdef glyph associated with it.java.lang.StringgetFullName()Get the Mac/English full name associated with the font, as required by the DefineFontName tag.doublegetHorizontalAdvance(char ccode)Get the advance width associated with the given character.intgetLastChar()Get the largest BMP value that has a non-notdef glyph associated with it.doublegetLineGap()Get the line gap for the font.intgetNumGlyphs()Get the number of glyphs in the font.voidgetOutline(char ccode, OutlineConsumer consumer)Get the outline associated with the given character.PermissiongetPermissions()Determine the permissions associated with this font.java.lang.StringgetPostscriptName()Get the postscript name associated with the font.java.lang.StringgetSubFamily()Get the subfamily name for the font.java.lang.StringgetTrademark()Get the trademark string associated with the font.booleanisBold()Return true iff the font is the bold member of a family.booleanisItalic()Return true iff the font is the italic member of a family.
-
-
-
Method Detail
-
getOutline
void getOutline(char ccode, OutlineConsumer consumer) throws UnsupportedFontException, InvalidFontExceptionGet the outline associated with the given character.
-
getHorizontalAdvance
double getHorizontalAdvance(char ccode) throws UnsupportedFontException, InvalidFontExceptionGet the advance width associated with the given character.
-
canDisplay
boolean canDisplay(char c) throws UnsupportedFontException, InvalidFontExceptionReturn 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, UnsupportedFontExceptionGet the family name for the font. Return null if none exists.
-
getSubFamily
java.lang.String getSubFamily() throws InvalidFontException, UnsupportedFontExceptionGet the subfamily name for the font. Return null if none exists.
-
getAscent
double getAscent() throws InvalidFontException, UnsupportedFontExceptionGet 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, UnsupportedFontExceptionGet 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, UnsupportedFontExceptionGet 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, UnsupportedFontExceptionGet the lowest unicode scalar value that has a non-notdef glyph associated with it.
-
getLastChar
int getLastChar() throws InvalidFontException, UnsupportedFontExceptionGet the largest BMP value that has a non-notdef glyph associated with it.
-
getNumGlyphs
int getNumGlyphs() throws InvalidFontException, UnsupportedFontExceptionGet the number of glyphs in the font.
-
isBold
boolean isBold() throws InvalidFontException, UnsupportedFontExceptionReturn true iff the font is the bold member of a family.
-
isItalic
boolean isItalic() throws InvalidFontException, UnsupportedFontExceptionReturn true iff the font is the italic member of a family.
-
getEmScale
double getEmScale() throws InvalidFontException, UnsupportedFontExceptionGet 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, UnsupportedFontExceptionGet the copyright string associated with the font. Return null if none exists.
-
getTrademark
java.lang.String getTrademark() throws InvalidFontException, UnsupportedFontExceptionGet the trademark string associated with the font. Return null if none exists.
-
getPostscriptName
java.lang.String getPostscriptName() throws InvalidFontException, UnsupportedFontExceptionGet the postscript name associated with the font. Return null if none exists.
-
getFullName
java.lang.String getFullName() throws InvalidFontException, UnsupportedFontExceptionGet the Mac/English full name associated with the font, as required by the DefineFontName tag. Return null if none exists.
-
-