Package com.adobe.fontengine.font.opentype
Classes to manipulate OpenType fonts.
The OpenTypeFont class
represents an OpenType font. Such a font can have either TrueType or CFF
outlines.
The class Container
provides one useful (static) method: Container.load to create
a bunch of OpenTypeFont from a stream of bytes. Most OpenType byte stream contain a
single font, but TTC streams can contain multiple, usually related, fonts.
Each table in an OpenType font has a corresponding class, except for the 'loca'
table which is better though of as an adjunct in the 'glyf' table. Typically,
the OpenTypeFont
object has one member for each table.
There are also a few utility classes, such as Tag.
Format version
OpenType uses versioning to allow for extensions to the format. In general, each table is equipped with a version number, made of a major version and a minor version (there are some tables which have only a minor version, or no version at all). The rule is that backward compatible extensions increment the minor version number, while backward incompatible extensions increment the major version number.
The classes in this package are programmed to fully handle all know format
versions at the time they are written. Each class corresponding to a table
specifies the format versions is fully handles. For example, the Post
class specifies that it handles versions 1.0, 2.0, 2.5, and 3.0. The classes
are also programmed to handle unknown version numbers, in the following way:
let s(M) be the set of the supported minor version numbers for major version M;
if an actual table has version Ma.ma, then
-
if s(Ma) is the empty set, or if ma is less than any of s(Ma), then the table
is rejected at the time the
OpenTypeFontobject is created. This may or may not cause the whole font to be rejected. -
otherwise, the table is interpreted according to minor version m which is the
smallif the major version of an actual table is supported, but the actual minor
version is not, then the largest If an actual font table has a major version
number which is not supported at all, then the table is rejected at the time
the
OpenTypeFontobject is created.
-
ClassDescriptionGives access to a 'CFF' table.Gives access to a 'cmap' table.Class used to receive the list of recognized subtables in this cmap table.Enum classes for the various platformIDs and encodingIDs.Gives access to the 'cvt' table.Gives access to the Apple 'fond' table.Creates font objects for OpenType fontsGives access to the 'fpgm' table.Gives access to the 'gasp' table.Gives access to a 'GDEF' table.Gives access to the 'glyf' table.This class supports PostScript glyph names.Gives access to the 'GPOS' table.Gives access to the 'GSUB' table.Gives access to the 'head' table.Gives access to the 'hhea' table.Gives access to the 'hmtx' table.Gives access to the 'kern' table.A LayoutTable is the base class for GSUB/GPOS/GDEF/BASE tables, and captures the common types: coverages, class definitions, etc.A LookupTable is the base class for GSUB/GPOS tables.Gives access to the 'LTSH' table.Gives access to the 'maxp' table.Gives access to the 'name' table.This class defines constants for the Macintosh encoding ids.This class defines constants for the Microsoft encoding ids.This class defines constants for the Microsoft language ids.This class defines constants for the platform ids.This class defines constants for the predefined entries in a 'name' table.Gives access to an OpenType fontRepresents the optical size data for an OpenType font.Gives access to the 'OS/2' table.Identifies a code page.Identifies a Unicode range.A sequence of bytes in an OpenType font file, with methods to access the basic types.Determine if a feature can be applied at some positions.Common OTSelector objects.Gives access to the 'post' table.Gives access to the 'prep' table.Base class for an OpenType tableTag manipulation and predefined tags.A TrueType composite outline.Interprets TT programs.A TrueType outline.Represents a point in a TrueType outline.A
Scalerfor OpenType fonts with TrueType outlines.A TrueType simple outline.Gives access to the 'vhea' table.Gives access to the 'vmtx' table.Gives access to the 'VORG' table.