java.awt.font
Interface OpenType


public interface OpenType

The OpenType interface represents OpenType and TrueType fonts. This interface makes it possible to obtain sfnt tables from the font. A particular Font object can implement this interface.

For more information on TrueType fonts, see the Apple TrueType Reference Manual ( http://fonts.apple.com/TTRefMan/index.html ).


Field Summary
static int TAG_ACNT sample code for java.awt.font.OpenType.TAG_ACNT definition code for java.awt.font.OpenType.TAG_ACNT
          Accent attachment.
static int TAG_AVAR sample code for java.awt.font.OpenType.TAG_AVAR definition code for java.awt.font.OpenType.TAG_AVAR
          Axis variaiton.
static int TAG_BASE sample code for java.awt.font.OpenType.TAG_BASE definition code for java.awt.font.OpenType.TAG_BASE
          Baseline data.
static int TAG_BDAT sample code for java.awt.font.OpenType.TAG_BDAT definition code for java.awt.font.OpenType.TAG_BDAT
          Bitmap data.
static int TAG_BLOC sample code for java.awt.font.OpenType.TAG_BLOC definition code for java.awt.font.OpenType.TAG_BLOC
          Bitmap location.
static int TAG_BSLN sample code for java.awt.font.OpenType.TAG_BSLN definition code for java.awt.font.OpenType.TAG_BSLN
          Baseline table.
static int TAG_CFF sample code for java.awt.font.OpenType.TAG_CFF definition code for java.awt.font.OpenType.TAG_CFF
          Compact font format (Type1 font).
static int TAG_CMAP sample code for java.awt.font.OpenType.TAG_CMAP definition code for java.awt.font.OpenType.TAG_CMAP
          Character to glyph mapping.
static int TAG_CVAR sample code for java.awt.font.OpenType.TAG_CVAR definition code for java.awt.font.OpenType.TAG_CVAR
          CVT variation.
static int TAG_CVT sample code for java.awt.font.OpenType.TAG_CVT definition code for java.awt.font.OpenType.TAG_CVT
          Control value table.
static int TAG_DSIG sample code for java.awt.font.OpenType.TAG_DSIG definition code for java.awt.font.OpenType.TAG_DSIG
          Digital signature.
static int TAG_EBDT sample code for java.awt.font.OpenType.TAG_EBDT definition code for java.awt.font.OpenType.TAG_EBDT
          Embedded bitmap data.
static int TAG_EBLC sample code for java.awt.font.OpenType.TAG_EBLC definition code for java.awt.font.OpenType.TAG_EBLC
          Embedded bitmap location.
static int TAG_EBSC sample code for java.awt.font.OpenType.TAG_EBSC definition code for java.awt.font.OpenType.TAG_EBSC
          Embedded bitmap scaling.
static int TAG_FDSC sample code for java.awt.font.OpenType.TAG_FDSC definition code for java.awt.font.OpenType.TAG_FDSC
          Font descriptors.
static int TAG_FEAT sample code for java.awt.font.OpenType.TAG_FEAT definition code for java.awt.font.OpenType.TAG_FEAT
          Feature name.
static int TAG_FMTX sample code for java.awt.font.OpenType.TAG_FMTX definition code for java.awt.font.OpenType.TAG_FMTX
          Font metrics.
static int TAG_FPGM sample code for java.awt.font.OpenType.TAG_FPGM definition code for java.awt.font.OpenType.TAG_FPGM
          Font program.
static int TAG_FVAR sample code for java.awt.font.OpenType.TAG_FVAR definition code for java.awt.font.OpenType.TAG_FVAR
          Font variation.
static int TAG_GASP sample code for java.awt.font.OpenType.TAG_GASP definition code for java.awt.font.OpenType.TAG_GASP
          Grid-fitting and scan conversion procedure.
static int TAG_GDEF sample code for java.awt.font.OpenType.TAG_GDEF definition code for java.awt.font.OpenType.TAG_GDEF
          Glyph definition.
static int TAG_GLYF sample code for java.awt.font.OpenType.TAG_GLYF definition code for java.awt.font.OpenType.TAG_GLYF
          Glyph data.
static int TAG_GPOS sample code for java.awt.font.OpenType.TAG_GPOS definition code for java.awt.font.OpenType.TAG_GPOS
          Glyph positioning.
static int TAG_GSUB sample code for java.awt.font.OpenType.TAG_GSUB definition code for java.awt.font.OpenType.TAG_GSUB
          Glyph substitution.
static int TAG_GVAR sample code for java.awt.font.OpenType.TAG_GVAR definition code for java.awt.font.OpenType.TAG_GVAR
          Glyph variation.
static int TAG_HDMX sample code for java.awt.font.OpenType.TAG_HDMX definition code for java.awt.font.OpenType.TAG_HDMX
          Horizontal device metrics.
static int TAG_HEAD sample code for java.awt.font.OpenType.TAG_HEAD definition code for java.awt.font.OpenType.TAG_HEAD
          Font header.
static int TAG_HHEA sample code for java.awt.font.OpenType.TAG_HHEA definition code for java.awt.font.OpenType.TAG_HHEA
          Horizontal metrics header.
static int TAG_HMTX sample code for java.awt.font.OpenType.TAG_HMTX definition code for java.awt.font.OpenType.TAG_HMTX
          Horizontal metrics.
static int TAG_JSTF sample code for java.awt.font.OpenType.TAG_JSTF definition code for java.awt.font.OpenType.TAG_JSTF
          Justification.
static int TAG_JUST sample code for java.awt.font.OpenType.TAG_JUST definition code for java.awt.font.OpenType.TAG_JUST
          Justification.
static int TAG_KERN sample code for java.awt.font.OpenType.TAG_KERN definition code for java.awt.font.OpenType.TAG_KERN
          Kerning.
static int TAG_LCAR sample code for java.awt.font.OpenType.TAG_LCAR definition code for java.awt.font.OpenType.TAG_LCAR
          Ligature caret.
static int TAG_LOCA sample code for java.awt.font.OpenType.TAG_LOCA definition code for java.awt.font.OpenType.TAG_LOCA
          Index to location.
static int TAG_LTSH sample code for java.awt.font.OpenType.TAG_LTSH definition code for java.awt.font.OpenType.TAG_LTSH
          Linear threshold.
static int TAG_MAXP sample code for java.awt.font.OpenType.TAG_MAXP definition code for java.awt.font.OpenType.TAG_MAXP
          Maximum profile.
static int TAG_MMFX sample code for java.awt.font.OpenType.TAG_MMFX definition code for java.awt.font.OpenType.TAG_MMFX
          Multiple master font metrics.
static int TAG_MMSD sample code for java.awt.font.OpenType.TAG_MMSD definition code for java.awt.font.OpenType.TAG_MMSD
          Multiple master supplementary data.
static int TAG_MORT sample code for java.awt.font.OpenType.TAG_MORT definition code for java.awt.font.OpenType.TAG_MORT
          Glyph metamorphosis.
static int TAG_NAME sample code for java.awt.font.OpenType.TAG_NAME definition code for java.awt.font.OpenType.TAG_NAME
          Naming table.
static int TAG_OPBD sample code for java.awt.font.OpenType.TAG_OPBD definition code for java.awt.font.OpenType.TAG_OPBD
          Optical bounds.
static int TAG_OS2 sample code for java.awt.font.OpenType.TAG_OS2 definition code for java.awt.font.OpenType.TAG_OS2
          OS/2 and Windows specific metrics.
static int TAG_PCLT sample code for java.awt.font.OpenType.TAG_PCLT definition code for java.awt.font.OpenType.TAG_PCLT
          PCL 5 data.
static int TAG_POST sample code for java.awt.font.OpenType.TAG_POST definition code for java.awt.font.OpenType.TAG_POST
          PostScript Information.
static int TAG_PREP sample code for java.awt.font.OpenType.TAG_PREP definition code for java.awt.font.OpenType.TAG_PREP
          CVT preprogram.
static int TAG_PROP sample code for java.awt.font.OpenType.TAG_PROP definition code for java.awt.font.OpenType.TAG_PROP
          Glyph properties.
static int TAG_TRAK sample code for java.awt.font.OpenType.TAG_TRAK definition code for java.awt.font.OpenType.TAG_TRAK
          Tracking.
static int TAG_TYP1 sample code for java.awt.font.OpenType.TAG_TYP1 definition code for java.awt.font.OpenType.TAG_TYP1
          Adobe Type 1 font data.
static int TAG_VDMX sample code for java.awt.font.OpenType.TAG_VDMX definition code for java.awt.font.OpenType.TAG_VDMX
          Vertical device metrics.
static int TAG_VHEA sample code for java.awt.font.OpenType.TAG_VHEA definition code for java.awt.font.OpenType.TAG_VHEA
          Vertical metrics header.
static int TAG_VMTX sample code for java.awt.font.OpenType.TAG_VMTX definition code for java.awt.font.OpenType.TAG_VMTX
          Vertical metrics.
 
Method Summary
 byte[] getFontTable sample code for java.awt.font.OpenType.getFontTable(int) definition code for java.awt.font.OpenType.getFontTable(int) (int sfntTag)
          Returns the table as an array of bytes for a specified tag.
 byte[] getFontTable sample code for java.awt.font.OpenType.getFontTable(int, int, int) definition code for java.awt.font.OpenType.getFontTable(int, int, int) (int sfntTag, int offset, int count)
          Returns a subset of the table as an array of bytes for a specified tag.
 byte[] getFontTable sample code for java.awt.font.OpenType.getFontTable(java.lang.String) definition code for java.awt.font.OpenType.getFontTable(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  strSfntTag)
          Returns the table as an array of bytes for a specified tag.
 byte[] getFontTable sample code for java.awt.font.OpenType.getFontTable(java.lang.String, int, int) definition code for java.awt.font.OpenType.getFontTable(java.lang.String, int, int) (String sample code for java.lang.String definition code for java.lang.String  strSfntTag, int offset, int count)
          Returns a subset of the table as an array of bytes for a specified tag.
 int getFontTableSize sample code for java.awt.font.OpenType.getFontTableSize(int) definition code for java.awt.font.OpenType.getFontTableSize(int) (int sfntTag)
          Returns the size of the table for a specified tag.
 int getFontTableSize sample code for java.awt.font.OpenType.getFontTableSize(java.lang.String) definition code for java.awt.font.OpenType.getFontTableSize(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  strSfntTag)
          Returns the size of the table for a specified tag.
 int getVersion sample code for java.awt.font.OpenType.getVersion() definition code for java.awt.font.OpenType.getVersion() ()
          Returns the version of the OpenType font.
 

Field Detail

TAG_CMAP sample code for java.awt.font.OpenType.TAG_CMAP

static final int TAG_CMAP
Character to glyph mapping. Table tag "cmap" in the Open Type Specification.

See Also:
Constant Field Values

TAG_HEAD sample code for java.awt.font.OpenType.TAG_HEAD

static final int TAG_HEAD
Font header. Table tag "head" in the Open Type Specification.

See Also:
Constant Field Values

TAG_NAME sample code for java.awt.font.OpenType.TAG_NAME

static final int TAG_NAME
Naming table. Table tag "name" in the Open Type Specification.

See Also:
Constant Field Values

TAG_GLYF sample code for java.awt.font.OpenType.TAG_GLYF

static final int TAG_GLYF
Glyph data. Table tag "glyf" in the Open Type Specification.

See Also:
Constant Field Values

TAG_MAXP sample code for java.awt.font.OpenType.TAG_MAXP

static final int TAG_MAXP
Maximum profile. Table tag "maxp" in the Open Type Specification.

See Also:
Constant Field Values

TAG_PREP sample code for java.awt.font.OpenType.TAG_PREP

static final int TAG_PREP
CVT preprogram. Table tag "prep" in the Open Type Specification.

See Also:
Constant Field Values

TAG_HMTX sample code for java.awt.font.OpenType.TAG_HMTX

static final int TAG_HMTX
Horizontal metrics. Table tag "hmtx" in the Open Type Specification.

See Also:
Constant Field Values

TAG_KERN sample code for java.awt.font.OpenType.TAG_KERN

static final int TAG_KERN
Kerning. Table tag "kern" in the Open Type Specification.

See Also:
Constant Field Values

TAG_HDMX sample code for java.awt.font.OpenType.TAG_HDMX

static final int TAG_HDMX
Horizontal device metrics. Table tag "hdmx" in the Open Type Specification.

See Also:
Constant Field Values

TAG_LOCA sample code for java.awt.font.OpenType.TAG_LOCA

static final int TAG_LOCA
Index to location. Table tag "loca" in the Open Type Specification.

See Also:
Constant Field Values

TAG_POST sample code for java.awt.font.OpenType.TAG_POST

static final int TAG_POST
PostScript Information. Table tag "post" in the Open Type Specification.

See Also:
Constant Field Values

TAG_OS2 sample code for java.awt.font.OpenType.TAG_OS2

static final int TAG_OS2
OS/2 and Windows specific metrics. Table tag "OS/2" in the Open Type Specification.

See Also:
Constant Field Values

TAG_CVT sample code for java.awt.font.OpenType.TAG_CVT

static final int TAG_CVT
Control value table. Table tag "cvt " in the Open Type Specification.

See Also:
Constant Field Values

TAG_GASP sample code for java.awt.font.OpenType.TAG_GASP

static final int TAG_GASP
Grid-fitting and scan conversion procedure. Table tag "gasp" in the Open Type Specification.

See Also:
Constant Field Values

TAG_VDMX sample code for java.awt.font.OpenType.TAG_VDMX

static final int TAG_VDMX
Vertical device metrics. Table tag "VDMX" in the Open Type Specification.

See Also:
Constant Field Values

TAG_VMTX sample code for java.awt.font.OpenType.TAG_VMTX

static final int TAG_VMTX
Vertical metrics. Table tag "vmtx" in the Open Type Specification.

See Also:
Constant Field Values

TAG_VHEA sample code for java.awt.font.OpenType.TAG_VHEA

static final int TAG_VHEA
Vertical metrics header. Table tag "vhea" in the Open Type Specification.

See Also:
Constant Field Values

TAG_HHEA sample code for java.awt.font.OpenType.TAG_HHEA

static final int TAG_HHEA
Horizontal metrics header. Table tag "hhea" in the Open Type Specification.

See Also:
Constant Field Values

TAG_TYP1 sample code for java.awt.font.OpenType.TAG_TYP1

static final int TAG_TYP1
Adobe Type 1 font data. Table tag "typ1" in the Open Type Specification.

See Also:
Constant Field Values

TAG_BSLN sample code for java.awt.font.OpenType.TAG_BSLN

static final int TAG_BSLN
Baseline table. Table tag "bsln" in the Open Type Specification.

See Also:
Constant Field Values

TAG_GSUB sample code for java.awt.font.OpenType.TAG_GSUB

static final int TAG_GSUB
Glyph substitution. Table tag "GSUB" in the Open Type Specification.

See Also:
Constant Field Values

TAG_DSIG sample code for java.awt.font.OpenType.TAG_DSIG

static final int TAG_DSIG
Digital signature. Table tag "DSIG" in the Open Type Specification.

See Also:
Constant Field Values

TAG_FPGM sample code for java.awt.font.OpenType.TAG_FPGM

static final int TAG_FPGM
Font program. Table tag "fpgm" in the Open Type Specification.

See Also:
Constant Field Values

TAG_FVAR sample code for java.awt.font.OpenType.TAG_FVAR

static final int TAG_FVAR
Font variation. Table tag "fvar" in the Open Type Specification.

See Also:
Constant Field Values

TAG_GVAR sample code for java.awt.font.OpenType.TAG_GVAR

static final int TAG_GVAR
Glyph variation. Table tag "gvar" in the Open Type Specification.

See Also:
Constant Field Values

TAG_CFF sample code for java.awt.font.OpenType.TAG_CFF

static final int TAG_CFF
Compact font format (Type1 font). Table tag "CFF " in the Open Type Specification.

See Also:
Constant Field Values

TAG_MMSD sample code for java.awt.font.OpenType.TAG_MMSD

static final int TAG_MMSD
Multiple master supplementary data. Table tag "MMSD" in the Open Type Specification.

See Also:
Constant Field Values

TAG_MMFX sample code for java.awt.font.OpenType.TAG_MMFX

static final int TAG_MMFX
Multiple master font metrics. Table tag "MMFX" in the Open Type Specification.

See Also:
Constant Field Values

TAG_BASE sample code for java.awt.font.OpenType.TAG_BASE

static final int TAG_BASE
Baseline data. Table tag "BASE" in the Open Type Specification.

See Also:
Constant Field Values

TAG_GDEF sample code for java.awt.font.OpenType.TAG_GDEF

static final int TAG_GDEF
Glyph definition. Table tag "GDEF" in the Open Type Specification.

See Also:
Constant Field Values

TAG_GPOS sample code for java.awt.font.OpenType.TAG_GPOS

static final int TAG_GPOS
Glyph positioning. Table tag "GPOS" in the Open Type Specification.

See Also:
Constant Field Values

TAG_JSTF sample code for java.awt.font.OpenType.TAG_JSTF

static final int TAG_JSTF
Justification. Table tag "JSTF" in the Open Type Specification.

See Also:
Constant Field Values

TAG_EBDT sample code for java.awt.font.OpenType.TAG_EBDT

static final int TAG_EBDT
Embedded bitmap data. Table tag "EBDT" in the Open Type Specification.

See Also:
Constant Field Values

TAG_EBLC sample code for java.awt.font.OpenType.TAG_EBLC

static final int TAG_EBLC
Embedded bitmap location. Table tag "EBLC" in the Open Type Specification.

See Also:
Constant Field Values

TAG_EBSC sample code for java.awt.font.OpenType.TAG_EBSC

static final int TAG_EBSC
Embedded bitmap scaling. Table tag "EBSC" in the Open Type Specification.

See Also:
Constant Field Values

TAG_LTSH sample code for java.awt.font.OpenType.TAG_LTSH

static final int TAG_LTSH
Linear threshold. Table tag "LTSH" in the Open Type Specification.

See Also:
Constant Field Values

TAG_PCLT sample code for java.awt.font.OpenType.TAG_PCLT

static final int TAG_PCLT
PCL 5 data. Table tag "PCLT" in the Open Type Specification.

See Also:
Constant Field Values

TAG_ACNT sample code for java.awt.font.OpenType.TAG_ACNT

static final int TAG_ACNT
Accent attachment. Table tag "acnt" in the Open Type Specification.

See Also:
Constant Field Values

TAG_AVAR sample code for java.awt.font.OpenType.TAG_AVAR

static final int TAG_AVAR
Axis variaiton. Table tag "avar" in the Open Type Specification.

See Also:
Constant Field Values

TAG_BDAT sample code for java.awt.font.OpenType.TAG_BDAT

static final int TAG_BDAT
Bitmap data. Table tag "bdat" in the Open Type Specification.

See Also:
Constant Field Values

TAG_BLOC sample code for java.awt.font.OpenType.TAG_BLOC

static final int TAG_BLOC
Bitmap location. Table tag "bloc" in the Open Type Specification.

See Also:
Constant Field Values

TAG_CVAR sample code for java.awt.font.OpenType.TAG_CVAR

static final int TAG_CVAR
CVT variation. Table tag "cvar" in the Open Type Specification.

See Also:
Constant Field Values

TAG_FEAT sample code for java.awt.font.OpenType.TAG_FEAT

static final int TAG_FEAT
Feature name. Table tag "feat" in the Open Type Specification.

See Also:
Constant Field Values

TAG_FDSC sample code for java.awt.font.OpenType.TAG_FDSC

static final int TAG_FDSC
Font descriptors. Table tag "fdsc" in the Open Type Specification.

See Also:
Constant Field Values

TAG_FMTX sample code for java.awt.font.OpenType.TAG_FMTX

static final int TAG_FMTX
Font metrics. Table tag "fmtx" in the Open Type Specification.

See Also:
Constant Field Values

TAG_JUST sample code for java.awt.font.OpenType.TAG_JUST

static final int TAG_JUST
Justification. Table tag "just" in the Open Type Specification.

See Also:
Constant Field Values

TAG_LCAR sample code for java.awt.font.OpenType.TAG_LCAR

static final int TAG_LCAR
Ligature caret. Table tag "lcar" in the Open Type Specification.

See Also:
Constant Field Values

TAG_MORT sample code for java.awt.font.OpenType.TAG_MORT

static final int TAG_MORT
Glyph metamorphosis. Table tag "mort" in the Open Type Specification.

See Also:
Constant Field Values

TAG_OPBD sample code for java.awt.font.OpenType.TAG_OPBD

static final int TAG_OPBD
Optical bounds. Table tag "opbd" in the Open Type Specification.

See Also:
Constant Field Values

TAG_PROP sample code for java.awt.font.OpenType.TAG_PROP

static final int TAG_PROP
Glyph properties. Table tag "prop" in the Open Type Specification.

See Also:
Constant Field Values

TAG_TRAK sample code for java.awt.font.OpenType.TAG_TRAK

static final int TAG_TRAK
Tracking. Table tag "trak" in the Open Type Specification.

See Also:
Constant Field Values
Method Detail

getVersion sample code for java.awt.font.OpenType.getVersion() definition code for java.awt.font.OpenType.getVersion()

int getVersion()
Returns the version of the OpenType font. 1.0 is represented as 0x00010000.

Returns:
the version of the OpenType font.

getFontTable sample code for java.awt.font.OpenType.getFontTable(int) definition code for java.awt.font.OpenType.getFontTable(int)

byte[] getFontTable(int sfntTag)
Returns the table as an array of bytes for a specified tag. Tags for sfnt tables include items like cmap, name and head. The byte array returned is a copy of the font data in memory.

Parameters:
sfntTag - a four-character code as a 32-bit integer
Returns:
a byte array that is the table that contains the font data corresponding to the specified tag.

getFontTable sample code for java.awt.font.OpenType.getFontTable(java.lang.String) definition code for java.awt.font.OpenType.getFontTable(java.lang.String)

byte[] getFontTable(String sample code for java.lang.String definition code for java.lang.String  strSfntTag)
Returns the table as an array of bytes for a specified tag. Tags for sfnt tables include items like cmap, name and head. The byte array returned is a copy of the font data in memory.

Parameters:
strSfntTag - a four-character code as a String
Returns:
a byte array that is the table that contains the font data corresponding to the specified tag.

getFontTable sample code for java.awt.font.OpenType.getFontTable(int, int, int) definition code for java.awt.font.OpenType.getFontTable(int, int, int)

byte[] getFontTable(int sfntTag,
                    int offset,
                    int count)
Returns a subset of the table as an array of bytes for a specified tag. Tags for sfnt tables include items like cmap, name and head. The byte array returned is a copy of the font data in memory.

Parameters:
sfntTag - a four-character code as a 32-bit integer
offset - index of first byte to return from table
count - number of bytes to return from table
Returns:
a subset of the table corresponding to sfntTag and containing the bytes starting at offset byte and including count bytes.

getFontTable sample code for java.awt.font.OpenType.getFontTable(java.lang.String, int, int) definition code for java.awt.font.OpenType.getFontTable(java.lang.String, int, int)

byte[] getFontTable(String sample code for java.lang.String definition code for java.lang.String  strSfntTag,
                    int offset,
                    int count)
Returns a subset of the table as an array of bytes for a specified tag. Tags for sfnt tables include items like cmap, name and head. The byte array returned is a copy of the font data in memory.

Parameters:
strSfntTag - a four-character code as a String
offset - index of first byte to return from table
count - number of bytes to return from table
Returns:
a subset of the table corresponding to strSfntTag and containing the bytes starting at offset byte and including count bytes.

getFontTableSize sample code for java.awt.font.OpenType.getFontTableSize(int) definition code for java.awt.font.OpenType.getFontTableSize(int)

int getFontTableSize(int sfntTag)
Returns the size of the table for a specified tag. Tags for sfnt tables include items like cmap, name and head.

Parameters:
sfntTag - a four-character code as a 32-bit integer
Returns:
the size of the table corresponding to the specified tag.

getFontTableSize sample code for java.awt.font.OpenType.getFontTableSize(java.lang.String) definition code for java.awt.font.OpenType.getFontTableSize(java.lang.String)

int getFontTableSize(String sample code for java.lang.String definition code for java.lang.String  strSfntTag)
Returns the size of the table for a specified tag. Tags for sfnt tables include items like cmap, name and head.

Parameters:
strSfntTag - a four-character code as a String
Returns:
the size of the table corresponding to the specified tag.