|
||||||||||
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
org.foray.font.FSTrueTypeFont
public class FSTrueTypeFont
High-level representation of a TrueType font.
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 | |
---|---|
static int |
DEFAULT_UNITS_PER_TEXT_SPACE
Constant indicating the default units per text-space unit used by TrueType fonts. |
Fields inherited from interface org.axsl.font.Font |
---|
INVALID_STRING, NORMAL_STRING |
Constructor Summary | |
---|---|
FSTrueTypeFont(RegisteredFont rf)
Construct an instance. |
Method Summary | |
---|---|
TrueTypeFont |
getFont()
Returns the encapsulated font. |
int[] |
getFontBBox()
Returns the bounding box for this font. |
org.axsl.font.Font.Format |
getFontFormat()
|
byte[] |
getRawFontFile(FontUse4a fontUse)
Returns the font file contents in a byte array. |
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. |
int |
getUnitsPerTextSpaceUnit()
Returns the units per text-space unit that is used in this font for internal font measurements. |
boolean |
glyphAvailable(int c)
Reports on the availability of a glyph in this font, without regard to encoding issues. |
boolean |
isPdfStandardFont()
Always returns false as all standard PDF fonts are Type 1 fonts. |
int |
metricIndex(int codePoint)
For a given Unicode code point index, returns the metric index. |
int |
overlinePosition(int fontSize)
|
int |
overlineSize(int fontSize)
|
void |
parseFont()
Parses the font contents for needed information. |
int |
strikeoutPosition(int fontSize)
|
int |
strikeoutSize(int fontSize)
|
boolean |
supportsUnicode()
Indicates whether this font has the ability to map Unicode characters to font glyphs. |
int |
underlinePosition(int fontSize)
|
int |
underlineSize(int fontSize)
|
int |
width(int c,
int fontSize)
|
int |
widthUndefinedGlyph(int fontSize)
Returns the width of the undefined or missing glyph. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_UNITS_PER_TEXT_SPACE
Constructor Detail |
---|
public FSTrueTypeFont(RegisteredFont rf) throws org.axsl.font.FontException, IOException
rf
- The RegisteredFont that should be used to create this font.
org.axsl.font.FontException
- For errors parsing the font.
IOException
- For errors reading content.Method Detail |
---|
public byte[] getRawFontFile(FontUse4a fontUse) throws IOException, org.axsl.font.FontException
FreeStandingFont
getRawFontFile
in class FreeStandingFont
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 void parseFont() throws org.axsl.font.FontException, IOException
org.axsl.font.FontException
- For errors parsing the font.
IOException
- For errors reading content.public int[] getFontBBox()
FreeStandingFont
getFontBBox
in class FreeStandingFont
public int getStemV()
FreeStandingFont
getStemV
in interface org.axsl.font.Font
getStemV
in class FreeStandingFont
public org.axsl.font.Font.Format getFontFormat()
getFontFormat
in interface org.axsl.font.Font
getFontFormat
in class Font4a
public int width(int c, int fontSize)
public int widthUndefinedGlyph(int fontSize)
Font4a
widthUndefinedGlyph
in class Font4a
fontSize
- The font size at which the width should be computed.
public boolean isPdfStandardFont()
isPdfStandardFont
in interface org.axsl.font.Font
isPdfStandardFont
in class Font4a
public boolean glyphAvailable(int c)
Font4a
glyphAvailable
in class Font4a
c
- The Unicode code point to be tested.
public int strikeoutSize(int fontSize)
public int strikeoutPosition(int fontSize)
public int underlineSize(int fontSize)
public int underlinePosition(int fontSize)
public int overlineSize(int fontSize)
public int overlinePosition(int fontSize)
public int getUnitsPerTextSpaceUnit()
Font4a
getUnitsPerTextSpaceUnit
in class Font4a
public boolean supportsUnicode()
Font4a
supportsUnicode
in class Font4a
public TrueTypeFont getFont()
public int metricIndex(int codePoint)
Font4a
metricIndex
in class Font4a
codePoint
- The Unicode code point to be converted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |