|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.foray.font.Font4a
org.foray.font.FreeStandingFont
public abstract class FreeStandingFont
Base class for all fonts that are registered independently of the operating system's font registration. Fonts that are not FreeStandingFonts are SystemFonts. Access to SystemFont capabilities is handled entirely through the parent Font class. However, FreeStandingFonts can be embedded, and this capability requires that more of the internals of the font be exposed to client applications.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.axsl.font.Font |
|---|
org.axsl.font.Font.Baseline, org.axsl.font.Font.Complexity, org.axsl.font.Font.Embedding, org.axsl.font.Font.Format, org.axsl.font.Font.LineHeightAlgorithm, org.axsl.font.Font.SelectionStrategy, org.axsl.font.Font.Stretch, org.axsl.font.Font.Style, org.axsl.font.Font.Variant, org.axsl.font.Font.Weight, org.axsl.font.Font.WritingMode |
| Field Summary |
|---|
| Fields inherited from interface org.axsl.font.Font |
|---|
INVALID_STRING, NORMAL_STRING |
| Constructor Summary | |
|---|---|
protected |
FreeStandingFont(RegisteredFont rf)
Constructor. |
| Method Summary | |
|---|---|
boolean |
allowsEmbedding()
Indicates whether the font allows embedding. |
int |
extractBaseline(org.axsl.font.Font.WritingMode writingMode,
org.axsl.font.Font.Baseline baselineType,
int fontSize)
Returns the font's explicit definition of the baseline, if possible. |
int |
getAscender(int fontSize)
|
Font |
getAwtFont(int fontSize)
FreeStandingFonts are never AWTFonts, so this always returns null. |
int |
getAWTFontFormat()
Computes the corresponding Java AWT font format constant. |
int |
getCapHeight(int fontSize)
|
org.axsl.ps.CharSet |
getCharSet()
Returns the character set used by this font. |
int |
getDefaultWidth()
Returns the default glyph width for this font. |
int |
getDescender(int fontSize)
|
String |
getFamilyName()
|
int |
getFlags()
Returns the PS/PDF flags for this font. |
abstract int[] |
getFontBBox()
Returns the bounding box for this font. |
org.axsl.font.Font.Complexity |
getFontComplexity()
|
protected InputStream |
getFontInputStream()
Returns the font content as a stream. |
String |
getFontName()
|
org.axsl.ps.Encoding |
getInternalEncoding()
Get the encoding scheme that should be used to embed this font in a PDF file. |
float |
getItalicAngle()
|
Kerning |
getKerning()
Returns the kerning information for this font. |
int |
getNumGlyphs()
Returns the number of glyphs in this font. |
byte[] |
getPanose()
|
Panose |
getPanoseInstance()
Returns this font's Panose instance. |
String |
getPostscriptName()
Returns the font's internal name, if given. |
abstract byte[] |
getRawFontFile(FontUse4a fontUse)
Returns the font file contents in a byte array. |
abstract int |
getStemV()
Returns the StemV value for this font, used in a PDF Font Descriptor, as defined in the PDF Reference, Second Edition, Section 5.7. |
short[] |
getWidths()
Returns the widths of the glyphs in this font in an array. |
int |
getXHeight(int fontSize)
|
boolean |
isEmbeddable()
Tells the client application whether this font can be embedded or not. |
boolean |
isSubsettable()
|
boolean |
kerningActive()
Reports whether kerning information should be used for this font. |
protected void |
setAllowsEmbedding(boolean allowsEmbedding)
Sets the allowsEmbedding. |
protected void |
setAscender(int ascender)
Sets the ascender. |
protected void |
setCapHeight(int capHeight)
Sets the cap height. |
protected void |
setCharSet(org.axsl.ps.CharSet charSet)
Sets the character set for this font. |
protected void |
setDescender(int descender)
Sets the descender. |
protected void |
setFamilyName(String familyName)
Sets the family name for this font. |
protected void |
setFlags(int flags)
Sets the flags. |
void |
setFontComplexity(org.axsl.font.Font.Complexity fontComplexity)
Sets the complexity value for this font. |
protected void |
setFontName(String fontName)
Sets the name of this font. |
protected void |
setInternalEncoding(org.axsl.ps.Encoding encoding)
Sets the internal encoding for this font. |
protected void |
setItalicAngle(float italicAngle)
Sets the italic angle. |
protected void |
setKerning(Kerning kerning)
Sets the kerning for this font. |
protected void |
setMissingWidth(int missingWidth)
Sets the missing width value. |
protected void |
setNumGlyphs(int numGlyphs)
Sets the number of glyphs in this font. |
protected void |
setPanose(Panose panose)
Sets the Panose value for this font. |
protected void |
setPostscriptName(String postscriptName)
Sets the postscript name for this font. |
protected void |
setWidths(short[] width)
Set the widths for this font. |
protected void |
setXHeight(int height)
Sets the x-height. |
SystemFont |
systemFontManifestation()
Returns the SystemFont manifestation of this font. |
boolean |
usableInPostScriptOutput()
Indicates whether this font can be referenced within a PostScript file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.axsl.font.Font |
|---|
overlinePosition, overlineSize, strikeoutPosition, strikeoutSize, underlinePosition, underlineSize, width |
| Constructor Detail |
|---|
protected FreeStandingFont(RegisteredFont rf)
rf - The parent registered font.| Method Detail |
|---|
public org.axsl.ps.Encoding getInternalEncoding()
getInternalEncoding in interface org.axsl.font.FontgetInternalEncoding in class Font4apublic String getFontName()
public String getFamilyName()
public String getPostscriptName()
public int getAscender(int fontSize)
getAscender in interface org.axsl.font.FontgetAscender in class Font4apublic int getDescender(int fontSize)
getDescender in interface org.axsl.font.FontgetDescender in class Font4apublic int getCapHeight(int fontSize)
getCapHeight in interface org.axsl.font.FontgetCapHeight in class Font4apublic int getXHeight(int fontSize)
getXHeight in interface org.axsl.font.FontgetXHeight in class Font4apublic abstract int[] getFontBBox()
public int getFlags()
public float getItalicAngle()
getItalicAngle in interface org.axsl.font.FontgetItalicAngle in class Font4apublic abstract int getStemV()
getStemV in interface org.axsl.font.FontgetStemV in class Font4apublic int getDefaultWidth()
getDefaultWidth in interface org.axsl.font.FontgetDefaultWidth in class Font4apublic final Kerning getKerning()
getKerning in class Font4apublic boolean isEmbeddable()
isEmbeddable in interface org.axsl.font.FontisEmbeddable in class Font4apublic boolean isSubsettable()
isSubsettable in interface org.axsl.font.FontisSubsettable in class Font4a
protected InputStream getFontInputStream()
throws org.axsl.font.FontException
org.axsl.font.FontException - For errors opening the input stream.
public abstract byte[] getRawFontFile(FontUse4a fontUse)
throws IOException,
org.axsl.font.FontException
fontUse - The specific font use, which is needed to get encoding and
subsetting information.
IOException - For I/O errors.
org.axsl.font.FontException - For errors parsing the font.public Font getAwtFont(int fontSize)
getAwtFont in interface org.axsl.font.FontgetAwtFont in class Font4apublic int getAWTFontFormat()
Font.TRUETYPE_FONT.
If the font is a Type1 font, returns:
Font.TYPE1_FONT.
If the font is any other format: -1.public boolean usableInPostScriptOutput()
usableInPostScriptOutput in interface org.axsl.font.FontusableInPostScriptOutput in class Font4apublic boolean kerningActive()
Font4a
kerningActive in class Font4apublic SystemFont systemFontManifestation()
SystemFont manifestation of this font.
public short[] getWidths()
public org.axsl.ps.CharSet getCharSet()
Font4a
getCharSet in class Font4a
public int extractBaseline(org.axsl.font.Font.WritingMode writingMode,
org.axsl.font.Font.Baseline baselineType,
int fontSize)
Font4a
extractBaseline in class Font4awritingMode - Same as for
Font.baselineOffset(Font.WritingMode, Baseline, int).baselineType - Same as for
Font.baselineOffset(Font.WritingMode, Baseline, int).fontSize - Same as for
Font.baselineOffset(Font.WritingMode, Baseline, int).
Font.baselineOffset(Font.WritingMode, Baseline, int), if it exists.
Otherwise, returns Integer.MIN_VALUE.public int getNumGlyphs()
Font4a
getNumGlyphs in class Font4aprotected void setNumGlyphs(int numGlyphs)
numGlyphs - The numGlyphs to set.protected void setCharSet(org.axsl.ps.CharSet charSet)
charSet - The character set to set.public boolean allowsEmbedding()
protected void setAllowsEmbedding(boolean allowsEmbedding)
allowsEmbedding - True if the font allows embedding, false
otherwise.protected void setInternalEncoding(org.axsl.ps.Encoding encoding)
encoding - The encoding to set.protected void setWidths(short[] width)
width - The width array to set.protected void setMissingWidth(int missingWidth)
missingWidth - The width to set.protected void setItalicAngle(float italicAngle)
italicAngle - The italic angle to set.protected void setAscender(int ascender)
ascender - The ascender to set.protected void setCapHeight(int capHeight)
capHeight - The capHeight to set.protected void setDescender(int descender)
descender - The descender to set.protected void setFlags(int flags)
flags - The flags to set.protected void setXHeight(int height)
height - The xHeight to set.protected void setFamilyName(String familyName)
familyName - The familyName to set.protected void setFontName(String fontName)
fontName - The fontName to set.protected void setKerning(Kerning kerning)
kerning - The kerning to set.protected void setPostscriptName(String postscriptName)
postscriptName - The postscriptName to set.protected void setPanose(Panose panose)
panose - The new Panose value.public Panose getPanoseInstance()
getPanose()public byte[] getPanose()
getPanoseInstance()public org.axsl.font.Font.Complexity getFontComplexity()
public void setFontComplexity(org.axsl.font.Font.Complexity fontComplexity)
fontComplexity - The complexity level to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||