Package org.apache.fontbox.ttf
Class VerticalHeaderTable
- java.lang.Object
-
- org.apache.fontbox.ttf.TTFTable
-
- org.apache.fontbox.ttf.VerticalHeaderTable
-
public class VerticalHeaderTable extends TTFTable
A vertical header 'vhea' table in a TrueType or OpenType font. Supports versions 1.0 and 1.1, for which the only difference is changing the specification names and descriptions of the ascender, descender, and lineGap fields to vertTypoAscender, vertTypoDescender, vertTypeLineGap. This table is required by the OpenType CJK Font Guidelines for "all OpenType fonts that are used for vertical writing". This table is specified in both the TrueType and OpenType specifications.
-
-
Field Summary
Fields Modifier and Type Field Description private int
advanceHeightMax
private short
ascender
private short
caretOffset
private short
caretSlopeRise
private short
caretSlopeRun
private short
descender
private short
lineGap
private short
metricDataFormat
private short
minBottomSideBearing
private short
minTopSideBearing
private int
numberOfVMetrics
private short
reserved1
private short
reserved2
private short
reserved3
private short
reserved4
static java.lang.String
TAG
A tag that identifies this table type.private float
version
private short
yMaxExtent
-
Fields inherited from class org.apache.fontbox.ttf.TTFTable
font, initialized
-
-
Constructor Summary
Constructors Constructor Description VerticalHeaderTable(TrueTypeFont font)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAdvanceHeightMax()
short
getAscender()
short
getCaretOffset()
short
getCaretSlopeRise()
short
getCaretSlopeRun()
short
getDescender()
short
getLineGap()
short
getMetricDataFormat()
short
getMinBottomSideBearing()
short
getMinTopSideBearing()
int
getNumberOfVMetrics()
short
getReserved1()
short
getReserved2()
short
getReserved3()
short
getReserved4()
float
getVersion()
short
getYMaxExtent()
(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
-
ascender
private short ascender
-
descender
private short descender
-
lineGap
private short lineGap
-
advanceHeightMax
private int advanceHeightMax
-
minTopSideBearing
private short minTopSideBearing
-
minBottomSideBearing
private short minBottomSideBearing
-
yMaxExtent
private short yMaxExtent
-
caretSlopeRise
private short caretSlopeRise
-
caretSlopeRun
private short caretSlopeRun
-
caretOffset
private short caretOffset
-
reserved1
private short reserved1
-
reserved2
private short reserved2
-
reserved3
private short reserved3
-
reserved4
private short reserved4
-
metricDataFormat
private short metricDataFormat
-
numberOfVMetrics
private int numberOfVMetrics
-
-
Constructor Detail
-
VerticalHeaderTable
VerticalHeaderTable(TrueTypeFont font)
-
-
Method Detail
-
read
void read(TrueTypeFont ttf, TTFDataStream data) throws java.io.IOException
This will read the required data from the stream.
-
getAdvanceHeightMax
public int getAdvanceHeightMax()
- Returns:
- Returns the advanceHeightMax.
-
getAscender
public short getAscender()
- Returns:
- Returns the ascender.
-
getCaretSlopeRise
public short getCaretSlopeRise()
- Returns:
- Returns the caretSlopeRise.
-
getCaretSlopeRun
public short getCaretSlopeRun()
- Returns:
- Returns the caretSlopeRun.
-
getCaretOffset
public short getCaretOffset()
- Returns:
- Returns the caretOffset.
-
getDescender
public short getDescender()
- Returns:
- Returns the descender.
-
getLineGap
public short getLineGap()
- Returns:
- Returns the lineGap.
-
getMetricDataFormat
public short getMetricDataFormat()
- Returns:
- Returns the metricDataFormat.
-
getMinTopSideBearing
public short getMinTopSideBearing()
- Returns:
- Returns the minTopSideBearing.
-
getMinBottomSideBearing
public short getMinBottomSideBearing()
- Returns:
- Returns the minBottomSideBearing.
-
getNumberOfVMetrics
public int getNumberOfVMetrics()
- Returns:
- Returns the numberOfVMetrics.
-
getReserved1
public short getReserved1()
- Returns:
- Returns the reserved1.
-
getReserved2
public short getReserved2()
- Returns:
- Returns the reserved2.
-
getReserved3
public short getReserved3()
- Returns:
- Returns the reserved3.
-
getReserved4
public short getReserved4()
- Returns:
- Returns the reserved4.
-
getVersion
public float getVersion()
- Returns:
- Returns the version.
-
getYMaxExtent
public short getYMaxExtent()
- Returns:
- Returns the yMaxExtent.
-
-