Top Description Fields Constructors Methods
org.apache.fontbox.ttf

public Class VerticalOriginTable

extends TTFTable
Class Inheritance
Imports
java.io.IOException, java.util.Map, java.util.concurrent.ConcurrentHashMap

A vertical origin 'VORG' table in an OpenType font. The purpose of this table is to improve the efficiency of determining vertical origins in CFF fonts where absent this information the bounding box would have to be extracted from CFF charstring data. This table is strongly recommended by the OpenType CJK Font Guidelines for "CFF OpenType fonts that are used for vertical writing". This table is specified only in the OpenType specification (1.3 and later).
Author
Glenn Adams

Field Summary

Modifier and TypeField and Description
private int
private Map<Integer, Integer>
public static final String
TAG

A tag that identifies this table type.

private float
Inherited from org.apache.fontbox.ttf.TTFTable:
initialized

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

Returns the y-coordinate of the vertical origin.
getOriginY
(int
GID
gid
)

Returns the y-coordinate of the vertical origin for the given GID if known, or returns the default value if not specified in table data.

public float

Returns:

Returns the version.
getVersion
()

pack-priv void
read(TrueTypeFont
The font that is being read.
ttf
,
TTFDataStream
The stream to read the data from.
data
)

Overrides org.apache.fontbox.ttf.TTFTable.read.

This will read the required data from the stream.

Inherited from org.apache.fontbox.ttf.TTFTable:
getCheckSumgetInitializedgetLengthgetOffsetgetTagreadHeaderssetCheckSumsetLengthsetOffsetsetTag

Field Detail

defaultVertOriginYback to summary
private int defaultVertOriginY
originsback to summary
private Map<Integer, Integer> origins
TAGback to summary
public static final String TAG

A tag that identifies this table type.

versionback to summary
private float version

Constructor Detail

VerticalOriginTableback to summary
pack-priv VerticalOriginTable()

Method Detail

getOriginYback to summary
public int getOriginY(int gid)

Returns the y-coordinate of the vertical origin for the given GID if known, or returns the default value if not specified in table data.

Parameters
gid:int

GID

Returns:int

Returns the y-coordinate of the vertical origin.

getVersionback to summary
public float getVersion()
Returns:float

Returns the version.

readback to summary
pack-priv void read(TrueTypeFont ttf, TTFDataStream data) throws IOException

Overrides org.apache.fontbox.ttf.TTFTable.read.

This will read the required data from the stream.

Parameters
ttf:TrueTypeFont

The font that is being read.

data:TTFDataStream

The stream to read the data from.

Annotations
@Override
Exceptions
IOException:
If there is an error reading the data.