public class KerningSubtable
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static interface |
KerningSubtable.PairData |
private static class |
KerningSubtable.PairData0Format0 |
Modifier and Type | Field and Description |
---|---|
private static int |
COVERAGE_CROSS_STREAM |
private static int |
COVERAGE_CROSS_STREAM_SHIFT |
private static int |
COVERAGE_FORMAT |
private static int |
COVERAGE_FORMAT_SHIFT |
private static int |
COVERAGE_HORIZONTAL |
private static int |
COVERAGE_HORIZONTAL_SHIFT |
private static int |
COVERAGE_MINIMUMS |
private static int |
COVERAGE_MINIMUMS_SHIFT |
private boolean |
crossStream |
private boolean |
horizontal |
private static org.apache.commons.logging.Log |
LOG |
private boolean |
minimums |
private KerningSubtable.PairData |
pairs |
Constructor and Description |
---|
KerningSubtable() |
Modifier and Type | Method and Description |
---|---|
private static int |
getBits(int bits,
int mask,
int shift) |
int[] |
getKerning(int[] glyphs)
Obtain kerning adjustments for GLYPHS sequence, where the
Nth returned adjustment is associated with the Nth glyph
and the succeeding non-zero glyph in the GLYPHS sequence.
|
int |
getKerning(int l,
int r)
Obtain kerning adjustment for glyph pair {L,R}.
|
private static boolean |
isBitsSet(int bits,
int mask,
int shift) |
boolean |
isHorizontalKerning()
Determine if subtable is designated for use in horizontal writing modes and
contains inline progression kerning pairs (not block progression "cross stream")
kerning pairs.
|
boolean |
isHorizontalKerning(boolean cross)
Determine if subtable is designated for use in horizontal writing modes, contains
kerning pairs (as opposed to minimum pairs), and, if CROSS is true, then return
cross stream designator; otherwise, if CROSS is false, return true if cross stream
designator is false.
|
(package private) void |
read(TTFDataStream data,
int version)
This will read the required data from the stream.
|
private void |
readSubtable0(TTFDataStream data) |
private void |
readSubtable0Format0(TTFDataStream data) |
private void |
readSubtable0Format2(TTFDataStream data) |
private void |
readSubtable1(TTFDataStream data) |
private static final org.apache.commons.logging.Log LOG
private static final int COVERAGE_HORIZONTAL
private static final int COVERAGE_MINIMUMS
private static final int COVERAGE_CROSS_STREAM
private static final int COVERAGE_FORMAT
private static final int COVERAGE_HORIZONTAL_SHIFT
private static final int COVERAGE_MINIMUMS_SHIFT
private static final int COVERAGE_CROSS_STREAM_SHIFT
private static final int COVERAGE_FORMAT_SHIFT
private boolean horizontal
private boolean minimums
private boolean crossStream
private KerningSubtable.PairData pairs
void read(TTFDataStream data, int version) throws java.io.IOException
data
- The stream to read the data from.version
- The version of the table to be readjava.io.IOException
- If there is an error reading the data.public boolean isHorizontalKerning()
public boolean isHorizontalKerning(boolean cross)
cross
- if true, then return cross stream designator in horizontal modespublic int[] getKerning(int[] glyphs)
glyphs
- a (possibly empty) array of glyph identifierspublic int getKerning(int l, int r)
l
- left member of glyph pairr
- right member of glyph pairprivate void readSubtable0(TTFDataStream data) throws java.io.IOException
java.io.IOException
private void readSubtable0Format0(TTFDataStream data) throws java.io.IOException
java.io.IOException
private void readSubtable0Format2(TTFDataStream data)
private void readSubtable1(TTFDataStream data)
private static boolean isBitsSet(int bits, int mask, int shift)
private static int getBits(int bits, int mask, int shift)