Package org.apache.fontbox.ttf
Class VerticalOriginTable
- java.lang.Object
-
- org.apache.fontbox.ttf.TTFTable
-
- org.apache.fontbox.ttf.VerticalOriginTable
-
public class VerticalOriginTable extends TTFTable
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).
-
-
Field Summary
Fields Modifier and Type Field Description private int
defaultVertOriginY
private java.util.Map<java.lang.Integer,java.lang.Integer>
origins
static java.lang.String
TAG
A tag that identifies this table type.private float
version
-
Fields inherited from class org.apache.fontbox.ttf.TTFTable
font, initialized
-
-
Constructor Summary
Constructors Constructor Description VerticalOriginTable(TrueTypeFont font)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.float
getVersion()
(package private) void
read(TrueTypeFont ttf, TTFDataStream data)
This will read the required data from the stream.-
Methods inherited from class org.apache.fontbox.ttf.TTFTable
getCheckSum, getInitialized, getLength, getOffset, getTag, setCheckSum, setLength, setOffset, setTag
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
A tag that identifies this table type.- See Also:
- Constant Field Values
-
version
private float version
-
defaultVertOriginY
private int defaultVertOriginY
-
origins
private java.util.Map<java.lang.Integer,java.lang.Integer> origins
-
-
Constructor Detail
-
VerticalOriginTable
VerticalOriginTable(TrueTypeFont font)
-
-
Method Detail
-
read
void read(TrueTypeFont ttf, TTFDataStream data) throws java.io.IOException
This will read the required data from the stream.
-
getVersion
public float getVersion()
- Returns:
- Returns the version.
-
getOriginY
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
- GID- Returns:
- Returns the y-coordinate of the vertical origin.
-
-