org.fontbox.ttf

Class OS2WindowsMetricsTable


public class OS2WindowsMetricsTable
extends TTFTable

A table in a true type font.
Version:
$Revision: 1.1 $
Author:
Ben Litchfield (ben@benlitchfield.com)

Field Summary

static int
FAMILY_CLASS_CLAREDON_SERIFS
Family class constant.
static int
FAMILY_CLASS_FREEFORM_SERIFS
Family class constant.
static int
FAMILY_CLASS_MODERN_SERIFS
Family class constant.
static int
FAMILY_CLASS_NO_CLASSIFICATION
Family class constant.
static int
FAMILY_CLASS_OLDSTYLE_SERIFS
Family class constant.
static int
FAMILY_CLASS_ORNAMENTALS
Family class constant.
static int
FAMILY_CLASS_SANS_SERIF
Family class constant.
static int
FAMILY_CLASS_SCRIPTS
Family class constant.
static int
FAMILY_CLASS_SLAB_SERIFS
Family class constant.
static int
FAMILY_CLASS_SYMBOLIC
Family class constant.
static int
FAMILY_CLASS_TRANSITIONAL_SERIFS
Family class constant.
static String
TAG
A tag that identifies this table type.
static int
WEIGHT_CLASS_BLACK
Weight class constant.
static int
WEIGHT_CLASS_BOLD
Weight class constant.
static int
WEIGHT_CLASS_EXTRA_BOLD
Weight class constant.
static int
WEIGHT_CLASS_LIGHT
Weight class constant.
static int
WEIGHT_CLASS_MEDIUM
Weight class constant.
static int
WEIGHT_CLASS_NORMAL
Weight class constant.
static int
WEIGHT_CLASS_SEMI_BOLD
Weight class constant.
static int
WEIGHT_CLASS_THIN
Weight class constant.
static int
WEIGHT_CLASS_ULTRA_LIGHT
Weight class constant.
static int
WIDTH_CLASS_CONDENSED
Width class constant.
static int
WIDTH_CLASS_EXPANDED
Width class constant.
static int
WIDTH_CLASS_EXTRA_CONDENSED
Width class constant.
static int
WIDTH_CLASS_EXTRA_EXPANDED
Width class constant.
static int
WIDTH_CLASS_MEDIUM
Width class constant.
static int
WIDTH_CLASS_SEMI_CONDENSED
Width class constant.
static int
WIDTH_CLASS_SEMI_EXPANDED
Width class constant.
static int
WIDTH_CLASS_ULTRA_CONDENSED
Width class constant.
static int
WIDTH_CLASS_ULTRA_EXPANDED
Width class constant.

Method Summary

String
getAchVendId()
short
getAverageCharWidth()
long
getCodePageRange1()
long
getCodePageRange2()
short
getFamilyClass()
int
getFirstCharIndex()
int
getFsSelection()
short
getFsType()
int
getLastCharIndex()
byte[]
getPanose()
short
getStrikeoutPosition()
short
getStrikeoutSize()
short
getSubscriptXOffset()
short
getSubscriptXSize()
short
getSubscriptYOffset()
short
getSubscriptYSize()
short
getSuperscriptXOffset()
short
getSuperscriptXSize()
short
getSuperscriptYOffset()
short
getSuperscriptYSize()
int
getTypeLineGap()
int
getTypoAscender()
int
getTypoDescender()
long
getUnicodeRange1()
long
getUnicodeRange2()
long
getUnicodeRange3()
long
getUnicodeRange4()
int
getVersion()
int
getWeightClass()
int
getWidthClass()
int
getWinAscent()
int
getWinDescent()
void
initData(TrueTypeFont ttf, TTFDataStream data)
This will read the required data from the stream.
void
setAchVendId(String achVendIdValue)
void
setAverageCharWidth(short averageCharWidthValue)
void
setCodePageRange1(long codePageRange1Value)
void
setCodePageRange2(long codePageRange2Value)
void
setFamilyClass(short familyClassValue)
void
setFirstCharIndex(int firstCharIndexValue)
void
setFsSelection(int fsSelectionValue)
void
setFsType(short fsTypeValue)
void
setLastCharIndex(int lastCharIndexValue)
void
setPanose(byte[] panoseValue)
void
setStrikeoutPosition(short strikeoutPositionValue)
void
setStrikeoutSize(short strikeoutSizeValue)
void
setSubscriptXOffset(short subscriptXOffsetValue)
void
setSubscriptXSize(short subscriptXSizeValue)
void
setSubscriptYOffset(short subscriptYOffsetValue)
void
setSubscriptYSize(short subscriptYSizeValue)
void
setSuperscriptXOffset(short superscriptXOffsetValue)
void
setSuperscriptXSize(short superscriptXSizeValue)
void
setSuperscriptYOffset(short superscriptYOffsetValue)
void
setSuperscriptYSize(short superscriptYSizeValue)
void
setTypeLineGap(int typeLineGapValue)
void
setTypoAscender(int typoAscenderValue)
void
setTypoDescender(int typoDescenderValue)
void
setUnicodeRange1(long unicodeRange1Value)
void
setUnicodeRange2(long unicodeRange2Value)
void
setUnicodeRange3(long unicodeRange3Value)
void
setUnicodeRange4(long unicodeRange4Value)
void
setVersion(int versionValue)
void
setWeightClass(int weightClassValue)
void
setWidthClass(int widthClassValue)
void
setWinAscent(int winAscentValue)
void
setWinDescent(int winDescentValue)

Methods inherited from class org.fontbox.ttf.TTFTable

getCheckSum, getLength, getOffset, getTag, initData, setCheckSum, setLength, setOffset, setTag

Field Details

FAMILY_CLASS_CLAREDON_SERIFS

public static final int FAMILY_CLASS_CLAREDON_SERIFS
Family class constant.
Field Value:
4

FAMILY_CLASS_FREEFORM_SERIFS

public static final int FAMILY_CLASS_FREEFORM_SERIFS
Family class constant.
Field Value:
7

FAMILY_CLASS_MODERN_SERIFS

public static final int FAMILY_CLASS_MODERN_SERIFS
Family class constant.
Field Value:
3

FAMILY_CLASS_NO_CLASSIFICATION

public static final int FAMILY_CLASS_NO_CLASSIFICATION
Family class constant.
Field Value:
0

FAMILY_CLASS_OLDSTYLE_SERIFS

public static final int FAMILY_CLASS_OLDSTYLE_SERIFS
Family class constant.
Field Value:
1

FAMILY_CLASS_ORNAMENTALS

public static final int FAMILY_CLASS_ORNAMENTALS
Family class constant.
Field Value:
9

FAMILY_CLASS_SANS_SERIF

public static final int FAMILY_CLASS_SANS_SERIF
Family class constant.
Field Value:
8

FAMILY_CLASS_SCRIPTS

public static final int FAMILY_CLASS_SCRIPTS
Family class constant.
Field Value:
10

FAMILY_CLASS_SLAB_SERIFS

public static final int FAMILY_CLASS_SLAB_SERIFS
Family class constant.
Field Value:
5

FAMILY_CLASS_SYMBOLIC

public static final int FAMILY_CLASS_SYMBOLIC
Family class constant.
Field Value:
12

FAMILY_CLASS_TRANSITIONAL_SERIFS

public static final int FAMILY_CLASS_TRANSITIONAL_SERIFS
Family class constant.
Field Value:
2

TAG

public static final String TAG
A tag that identifies this table type.

WEIGHT_CLASS_BLACK

public static final int WEIGHT_CLASS_BLACK
Weight class constant.
Field Value:
900

WEIGHT_CLASS_BOLD

public static final int WEIGHT_CLASS_BOLD
Weight class constant.
Field Value:
700

WEIGHT_CLASS_EXTRA_BOLD

public static final int WEIGHT_CLASS_EXTRA_BOLD
Weight class constant.
Field Value:
800

WEIGHT_CLASS_LIGHT

public static final int WEIGHT_CLASS_LIGHT
Weight class constant.
Field Value:
300

WEIGHT_CLASS_MEDIUM

public static final int WEIGHT_CLASS_MEDIUM
Weight class constant.
Field Value:
500

WEIGHT_CLASS_NORMAL

public static final int WEIGHT_CLASS_NORMAL
Weight class constant.
Field Value:
400

WEIGHT_CLASS_SEMI_BOLD

public static final int WEIGHT_CLASS_SEMI_BOLD
Weight class constant.
Field Value:
600

WEIGHT_CLASS_THIN

public static final int WEIGHT_CLASS_THIN
Weight class constant.
Field Value:
100

WEIGHT_CLASS_ULTRA_LIGHT

public static final int WEIGHT_CLASS_ULTRA_LIGHT
Weight class constant.
Field Value:
200

WIDTH_CLASS_CONDENSED

public static final int WIDTH_CLASS_CONDENSED
Width class constant.
Field Value:
3

WIDTH_CLASS_EXPANDED

public static final int WIDTH_CLASS_EXPANDED
Width class constant.
Field Value:
7

WIDTH_CLASS_EXTRA_CONDENSED

public static final int WIDTH_CLASS_EXTRA_CONDENSED
Width class constant.
Field Value:
2

WIDTH_CLASS_EXTRA_EXPANDED

public static final int WIDTH_CLASS_EXTRA_EXPANDED
Width class constant.
Field Value:
8

WIDTH_CLASS_MEDIUM

public static final int WIDTH_CLASS_MEDIUM
Width class constant.
Field Value:
5

WIDTH_CLASS_SEMI_CONDENSED

public static final int WIDTH_CLASS_SEMI_CONDENSED
Width class constant.
Field Value:
4

WIDTH_CLASS_SEMI_EXPANDED

public static final int WIDTH_CLASS_SEMI_EXPANDED
Width class constant.
Field Value:
6

WIDTH_CLASS_ULTRA_CONDENSED

public static final int WIDTH_CLASS_ULTRA_CONDENSED
Width class constant.
Field Value:
1

WIDTH_CLASS_ULTRA_EXPANDED

public static final int WIDTH_CLASS_ULTRA_EXPANDED
Width class constant.
Field Value:
9

Method Details

getAchVendId

public String getAchVendId()
Returns:
Returns the achVendId.

getAverageCharWidth

public short getAverageCharWidth()
Returns:
Returns the averageCharWidth.

getCodePageRange1

public long getCodePageRange1()
Returns:
Returns the codePageRange1.

getCodePageRange2

public long getCodePageRange2()
Returns:
Returns the codePageRange2.

getFamilyClass

public short getFamilyClass()
Returns:
Returns the familyClass.

getFirstCharIndex

public int getFirstCharIndex()
Returns:
Returns the firstCharIndex.

getFsSelection

public int getFsSelection()
Returns:
Returns the fsSelection.

getFsType

public short getFsType()
Returns:
Returns the fsType.

getLastCharIndex

public int getLastCharIndex()
Returns:
Returns the lastCharIndex.

getPanose

public byte[] getPanose()
Returns:
Returns the panose.

getStrikeoutPosition

public short getStrikeoutPosition()
Returns:
Returns the strikeoutPosition.

getStrikeoutSize

public short getStrikeoutSize()
Returns:
Returns the strikeoutSize.

getSubscriptXOffset

public short getSubscriptXOffset()
Returns:
Returns the subscriptXOffset.

getSubscriptXSize

public short getSubscriptXSize()
Returns:
Returns the subscriptXSize.

getSubscriptYOffset

public short getSubscriptYOffset()
Returns:
Returns the subscriptYOffset.

getSubscriptYSize

public short getSubscriptYSize()
Returns:
Returns the subscriptYSize.

getSuperscriptXOffset

public short getSuperscriptXOffset()
Returns:
Returns the superscriptXOffset.

getSuperscriptXSize

public short getSuperscriptXSize()
Returns:
Returns the superscriptXSize.

getSuperscriptYOffset

public short getSuperscriptYOffset()
Returns:
Returns the superscriptYOffset.

getSuperscriptYSize

public short getSuperscriptYSize()
Returns:
Returns the superscriptYSize.

getTypeLineGap

public int getTypeLineGap()
Returns:
Returns the typeLineGap.

getTypoAscender

public int getTypoAscender()
Returns:
Returns the typoAscender.

getTypoDescender

public int getTypoDescender()
Returns:
Returns the typoDescender.

getUnicodeRange1

public long getUnicodeRange1()
Returns:
Returns the unicodeRange1.

getUnicodeRange2

public long getUnicodeRange2()
Returns:
Returns the unicodeRange2.

getUnicodeRange3

public long getUnicodeRange3()
Returns:
Returns the unicodeRange3.

getUnicodeRange4

public long getUnicodeRange4()
Returns:
Returns the unicodeRange4.

getVersion

public int getVersion()
Returns:
Returns the version.

getWeightClass

public int getWeightClass()
Returns:
Returns the weightClass.

getWidthClass

public int getWidthClass()
Returns:
Returns the widthClass.

getWinAscent

public int getWinAscent()
Returns:
Returns the winAscent.

getWinDescent

public int getWinDescent()
Returns:
Returns the winDescent.

initData

public void initData(TrueTypeFont ttf,
                     TTFDataStream data)
            throws IOException
This will read the required data from the stream.
Overrides:
initData in interface TTFTable
Parameters:
ttf - The font that is being read.
data - The stream to read the data from.

setAchVendId

public void setAchVendId(String achVendIdValue)
Parameters:
achVendIdValue - The achVendId to set.

setAverageCharWidth

public void setAverageCharWidth(short averageCharWidthValue)
Parameters:
averageCharWidthValue - The averageCharWidth to set.

setCodePageRange1

public void setCodePageRange1(long codePageRange1Value)
Parameters:
codePageRange1Value - The codePageRange1 to set.

setCodePageRange2

public void setCodePageRange2(long codePageRange2Value)
Parameters:
codePageRange2Value - The codePageRange2 to set.

setFamilyClass

public void setFamilyClass(short familyClassValue)
Parameters:
familyClassValue - The familyClass to set.

setFirstCharIndex

public void setFirstCharIndex(int firstCharIndexValue)
Parameters:
firstCharIndexValue - The firstCharIndex to set.

setFsSelection

public void setFsSelection(int fsSelectionValue)
Parameters:
fsSelectionValue - The fsSelection to set.

setFsType

public void setFsType(short fsTypeValue)
Parameters:
fsTypeValue - The fsType to set.

setLastCharIndex

public void setLastCharIndex(int lastCharIndexValue)
Parameters:
lastCharIndexValue - The lastCharIndex to set.

setPanose

public void setPanose(byte[] panoseValue)
Parameters:
panoseValue - The panose to set.

setStrikeoutPosition

public void setStrikeoutPosition(short strikeoutPositionValue)
Parameters:
strikeoutPositionValue - The strikeoutPosition to set.

setStrikeoutSize

public void setStrikeoutSize(short strikeoutSizeValue)
Parameters:
strikeoutSizeValue - The strikeoutSize to set.

setSubscriptXOffset

public void setSubscriptXOffset(short subscriptXOffsetValue)
Parameters:
subscriptXOffsetValue - The subscriptXOffset to set.

setSubscriptXSize

public void setSubscriptXSize(short subscriptXSizeValue)
Parameters:
subscriptXSizeValue - The subscriptXSize to set.

setSubscriptYOffset

public void setSubscriptYOffset(short subscriptYOffsetValue)
Parameters:
subscriptYOffsetValue - The subscriptYOffset to set.

setSubscriptYSize

public void setSubscriptYSize(short subscriptYSizeValue)
Parameters:
subscriptYSizeValue - The subscriptYSize to set.

setSuperscriptXOffset

public void setSuperscriptXOffset(short superscriptXOffsetValue)
Parameters:
superscriptXOffsetValue - The superscriptXOffset to set.

setSuperscriptXSize

public void setSuperscriptXSize(short superscriptXSizeValue)
Parameters:
superscriptXSizeValue - The superscriptXSize to set.

setSuperscriptYOffset

public void setSuperscriptYOffset(short superscriptYOffsetValue)
Parameters:
superscriptYOffsetValue - The superscriptYOffset to set.

setSuperscriptYSize

public void setSuperscriptYSize(short superscriptYSizeValue)
Parameters:
superscriptYSizeValue - The superscriptYSize to set.

setTypeLineGap

public void setTypeLineGap(int typeLineGapValue)
Parameters:
typeLineGapValue - The typeLineGap to set.

setTypoAscender

public void setTypoAscender(int typoAscenderValue)
Parameters:
typoAscenderValue - The typoAscender to set.

setTypoDescender

public void setTypoDescender(int typoDescenderValue)
Parameters:
typoDescenderValue - The typoDescender to set.

setUnicodeRange1

public void setUnicodeRange1(long unicodeRange1Value)
Parameters:
unicodeRange1Value - The unicodeRange1 to set.

setUnicodeRange2

public void setUnicodeRange2(long unicodeRange2Value)
Parameters:
unicodeRange2Value - The unicodeRange2 to set.

setUnicodeRange3

public void setUnicodeRange3(long unicodeRange3Value)
Parameters:
unicodeRange3Value - The unicodeRange3 to set.

setUnicodeRange4

public void setUnicodeRange4(long unicodeRange4Value)
Parameters:
unicodeRange4Value - The unicodeRange4 to set.

setVersion

public void setVersion(int versionValue)
Parameters:
versionValue - The version to set.

setWeightClass

public void setWeightClass(int weightClassValue)
Parameters:
weightClassValue - The weightClass to set.

setWidthClass

public void setWidthClass(int widthClassValue)
Parameters:
widthClassValue - The widthClass to set.

setWinAscent

public void setWinAscent(int winAscentValue)
Parameters:
winAscentValue - The winAscent to set.

setWinDescent

public void setWinDescent(int winDescentValue)
Parameters:
winDescentValue - The winDescent to set.