|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.font.format.xtf.XtfReader
public class XtfReader
Reader for a TrueType / OpenType font.
| Field Summary | |
|---|---|
static int |
ACNT
Accent attachment. |
static int |
AVAR
Axis variation. |
static int |
BASE
Baseline data. |
static int |
BDAT
Bitmap data. |
static int |
BLOC
Bitmap location. |
static int |
BSLN
Baseline table. |
static int |
CFF
Compact font format (Type1 font). |
static int |
CMAP
Character to glyph mapping. |
static int |
CVAR
CVT variation. |
static int |
CVT
Control value table. |
static int |
DSIG
Digital signature. |
static int |
EBDT
Embedded bitmap data. |
static int |
EBLC
Embedded bitmap location. |
static int |
EBSC
Embedded bitmap scaling. |
static java.lang.String |
EXTEX_TRACE_FONT_FILES
The field EXTEX_TRACE_FONT_FILES. |
static int |
FDSC
BaseFont descriptors. |
static int |
FEAT
Feature name. |
static int |
FMTX
BaseFont metrics. |
static int |
FPGM
BaseFont program. |
static int |
FVAR
BaseFont variation. |
static int |
GASP
Grid-fitting and scan conversion procedure. |
static int |
GDEF
Glyph definition. |
static int |
GLYF
Glyph data. |
static int |
GPOS
Glyph positioning. |
static int |
GSUB
Glyph substitution. |
static int |
GVAR
Glyph variation. |
static int |
HDMX
Horizontal device metrics. |
static int |
HEAD
BaseFont header. |
static int |
HHEA
Horizontal metrics header. |
static int |
HMTX
Horizontal metrics. |
static int |
JSTF
Justification. |
static int |
JUST
Justification. |
static int |
KERN
Kerning. |
static int |
LCAR
Ligature caret. |
static int |
LOCA
Index to location. |
static int |
LTSH
Linear threshold. |
static int |
MAXP
Maximum profile. |
static int |
MMFX
Multiple master font metrics. |
static int |
MMSD
Multiple master supplementary data. |
static int |
MORT
Glyph metamorphosis. |
static int |
NAME
Naming table. |
static int |
OS_2
OS/2 and Windows specific metrics. |
static org.extex.font.format.xtf.XtfReader.Type |
OTF
OTF. |
static int |
PCLT
PCL 5 data. |
static int |
POST
PostScript Information. |
static int |
PREP
CVT preprogram. |
static int |
PROP
Glyph properties. |
static int |
TRAK
Tracking. |
static org.extex.font.format.xtf.XtfReader.Type |
TTF
TTF. |
static int |
TYP1
Adobe Type 1 font data. |
static int |
VDMX
Vertical device metrics. |
static int |
VHEA
Vertical metrics header. |
static int |
VMTX
Vertical metrics. |
| Constructor Summary | |
|---|---|
XtfReader(java.io.File file)
Create a new object. |
|
XtfReader(java.io.File file,
java.util.logging.Logger logger)
Create a new object. |
|
XtfReader(java.io.InputStream iostream)
Create a new object. |
|
XtfReader(java.io.InputStream iostream,
java.util.logging.Logger logger)
Create a new object. |
|
XtfReader(RandomAccessR rar)
Create a new object. |
|
XtfReader(RandomAccessR rar,
java.util.logging.Logger logger)
Create a new object. |
|
XtfReader(java.lang.String filename)
Create a new object. |
|
XtfReader(java.lang.String filename,
java.util.logging.Logger logger)
Create a new object. |
|
| Method Summary | |
|---|---|
static java.util.Date |
convertDate(long value)
Convert the internal long date format to a Date. |
static java.lang.String |
convertIntToBinaryString(int value)
Convert a int value in a binary string. |
static java.lang.String |
convertIntToHexString(int value)
Convert a int value in a hex string. |
static float |
convertVersion(int value)
Convert a Fixed value (Version). |
int |
getAscent()
Returns the ascent. |
int[] |
getBoundingBox()
Returns the BoundingBox. |
TtfTableCMAP |
getCmapTable()
Returns the cmap table. |
int |
getDescent()
Returns the descent. |
byte[] |
getFontData()
Returns the data of the font. |
java.lang.String |
getFontFamilyName()
Returns the font family name. |
XtfGlyph |
getGlyph(int i)
Returns the glyph. |
TtfTableHEAD |
getHeadTable()
Returns the head table. |
TtfTableHHEA |
getHheaTable()
Returns the hhea table. |
TtfTableHMTX |
getHmtxTable()
Returns the hmtx table. |
int |
getItalicAngle()
Returns the italic angle. |
TtfTableLOCA |
getLocaTable()
Returns the loca table. |
TtfTableMAXP |
getMaxpTable()
Returns the os2 table. |
TtfTableNAME |
getNameTable()
Returns the maxp table. |
int |
getNumberOfGlyphs()
Returns the number of glyphs. |
TtfTableOS2 |
getOS2Table()
Returns the os2 table. |
TtfTablePOST |
getPostTable()
Returns the post table. |
XtfTable |
getTable(int tabletype)
Return the table with the special type. |
XtfTableDirectory |
getTableDirectory()
Returns the table directory. |
org.extex.font.format.xtf.XtfReader.Type |
getType()
Returns the font type. |
int |
getUnderlinePos()
Return the underline position. |
int |
getUnderlineThickness()
Return the underline thickness. |
int |
getUnitsPerEm()
Returns the units per em. |
boolean |
hasGlyph(java.lang.String glyphname,
int fontnumber)
Check, if the font has the glpyh. |
XtfBoundingBox |
mapCharCodeToBB(int charCode,
int fontnumber,
short platformId,
short encodingId)
Returns the bounding box for the char by using the platform and encoding. |
XtfBoundingBox |
mapCharCodeToBB(java.lang.String glypname,
int fontnumber,
short platformId,
short encodingId)
Returns the glyph bounding box for the char by using the platform and encoding. |
java.lang.String |
mapCharCodeToGlyphname(int charCode,
int fontnumber,
short platformId,
short encodingId)
Returns the glyph name for the char by using the platform and encoding. |
int |
mapCharCodetoKerning(int charcodeLeft,
int charcodeRigth,
int fontnumber,
short platformId,
short encodingId)
Returns the kerning for the two chars. |
int |
mapCharCodetoLigature(int charcodeLeft,
int charcodeRigth,
java.util.List<java.lang.String> feature,
java.lang.String language,
int fontnumber,
short platformId,
short encodingId)
Returns the ligature for the two chars. |
int |
mapCharCodeToWidth(int charCode,
int fontnumber,
short platformId,
short encodingId)
Returns the glyph width for the char by using the platform and encoding. |
int |
mapCharCodeToWidth(java.lang.String glyphname,
int fontnumber,
short platformId,
short encodingId)
Returns the glyph width for the char by using the platform and encoding. |
void |
writeXML(XMLStreamWriter writer)
Write the data to a XMLStreamWriter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ACNT
public static final int AVAR
public static final int BASE
public static final int BDAT
public static final int BLOC
public static final int BSLN
public static final int CFF
public static final int CMAP
public static final int CVAR
public static final int CVT
public static final int DSIG
public static final int EBDT
public static final int EBLC
public static final int EBSC
public static final java.lang.String EXTEX_TRACE_FONT_FILES
public static final int FDSC
public static final int FEAT
public static final int FMTX
public static final int FPGM
public static final int FVAR
public static final int GASP
public static final int GDEF
public static final int GLYF
public static final int GPOS
public static final int GSUB
public static final int GVAR
public static final int HDMX
public static final int HEAD
public static final int HHEA
public static final int HMTX
public static final int JSTF
public static final int JUST
public static final int KERN
public static final int LCAR
public static final int LOCA
public static final int LTSH
public static final int MAXP
public static final int MMFX
public static final int MMSD
public static final int MORT
public static final int NAME
public static final int OS_2
public static final org.extex.font.format.xtf.XtfReader.Type OTF
public static final int PCLT
public static final int POST
public static final int PREP
public static final int PROP
public static final int TRAK
public static final org.extex.font.format.xtf.XtfReader.Type TTF
public static final int TYP1
public static final int VDMX
public static final int VHEA
public static final int VMTX
| Constructor Detail |
|---|
public XtfReader(java.io.File file)
throws java.io.IOException
file - The file for input.
java.io.IOException - if an IO-error occurs
public XtfReader(java.io.File file,
java.util.logging.Logger logger)
throws java.io.IOException
file - The file for input.logger - The logger.
java.io.IOException - if an IO-error occurs
public XtfReader(java.io.InputStream iostream)
throws java.io.IOException
iostream - The stream for input.
java.io.IOException - if an IO-error occurs
public XtfReader(java.io.InputStream iostream,
java.util.logging.Logger logger)
throws java.io.IOException
iostream - The stream for input.logger - The logger.
java.io.IOException - if an IO-error occurs
public XtfReader(RandomAccessR rar)
throws java.io.IOException
rar - The input.
java.io.IOException - if an IO-error occurs
public XtfReader(RandomAccessR rar,
java.util.logging.Logger logger)
throws java.io.IOException
rar - The input.logger - The logger.
java.io.IOException - if an IO-error occurs
public XtfReader(java.lang.String filename)
throws java.io.IOException
filename - The file name for input.
java.io.IOException - if an IO-error occurs
public XtfReader(java.lang.String filename,
java.util.logging.Logger logger)
throws java.io.IOException
filename - The file name for input.logger - The logger.
java.io.IOException - if an IO-error occurs| Method Detail |
|---|
public static java.util.Date convertDate(long value)
Calculate the difference between the original Mac epoch (1904) to the epoch on this machine.
value - the long format (mac)
public static java.lang.String convertIntToBinaryString(int value)
value - the int value
public static java.lang.String convertIntToHexString(int value)
value - the int value
public static float convertVersion(int value)
value - the fixed value
public int getAscent()
public int[] getBoundingBox()
0 xmin
1 ymin
2 xmax
3 ymax
public TtfTableCMAP getCmapTable()
public int getDescent()
public byte[] getFontData()
public java.lang.String getFontFamilyName()
public XtfGlyph getGlyph(int i)
i - glyph number
public TtfTableHEAD getHeadTable()
public TtfTableHHEA getHheaTable()
public TtfTableHMTX getHmtxTable()
public int getItalicAngle()
public TtfTableLOCA getLocaTable()
public TtfTableMAXP getMaxpTable()
public TtfTableNAME getNameTable()
public int getNumberOfGlyphs()
public TtfTableOS2 getOS2Table()
public TtfTablePOST getPostTable()
public XtfTable getTable(int tabletype)
tabletype - the table type
public XtfTableDirectory getTableDirectory()
public org.extex.font.format.xtf.XtfReader.Type getType()
public int getUnderlinePos()
public int getUnderlineThickness()
public int getUnitsPerEm()
public boolean hasGlyph(java.lang.String glyphname,
int fontnumber)
glyphname - The glyph name.fontnumber - The font number.
true, if the font has the glyph.
public XtfBoundingBox mapCharCodeToBB(int charCode,
int fontnumber,
short platformId,
short encodingId)
null be returned.
charCode - The charCode.fontnumber - The font number.platformId - The platform id.encodingId - The encoding id.
public XtfBoundingBox mapCharCodeToBB(java.lang.String glypname,
int fontnumber,
short platformId,
short encodingId)
null be returned.
glypname - The glyph name.fontnumber - The font number.platformId - The platform id.encodingId - The encoding id.
public java.lang.String mapCharCodeToGlyphname(int charCode,
int fontnumber,
short platformId,
short encodingId)
null will be returned.
charCode - The char code.fontnumber - The font number.platformId - The platform id.encodingId - The encoding id.
public int mapCharCodetoKerning(int charcodeLeft,
int charcodeRigth,
int fontnumber,
short platformId,
short encodingId)
charcodeLeft - The left char code.charcodeRigth - The right char code.fontnumber - The font number.platformId - The platform id.encodingId - The encoding id.
public int mapCharCodetoLigature(int charcodeLeft,
int charcodeRigth,
java.util.List<java.lang.String> feature,
java.lang.String language,
int fontnumber,
short platformId,
short encodingId)
charcodeLeft - The left char code.charcodeRigth - The right char code.feature - The feature tag.language - The language (null for default).fontnumber - The font number.platformId - The platform id.encodingId - The encoding id.
public int mapCharCodeToWidth(int charCode,
int fontnumber,
short platformId,
short encodingId)
charCode - The char code.fontnumber - The font number.platformId - The platform id.encodingId - The encoding id.
public int mapCharCodeToWidth(java.lang.String glyphname,
int fontnumber,
short platformId,
short encodingId)
glyphname - The glyph name.fontnumber - The font number.platformId - The platform id.encodingId - The encoding id.
public void writeXML(XMLStreamWriter writer)
throws java.io.IOException
XMLWriterConvertible
writeXML in interface XMLWriterConvertiblewriter - the XML-Writer
java.io.IOException - if an IO-error occurs.XMLWriterConvertible.writeXML(
org.extex.util.xml.XMLStreamWriter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||