public class AFMFile extends Object
Constructor and Description |
---|
AFMFile()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCharMetrics(AFMCharMetrics metrics)
Adds new character metrics.
|
void |
addXKerning(String name1,
String name2,
double kx)
Adds a X-kerning entry.
|
Map |
createXKerningMapEncoded()
Creates and returns a kerning map for writing mode 0 (ltr) with character codes.
|
Number |
getAscender()
Returns the Ascender value.
|
Number |
getCapHeight()
Returns the CapHeight value.
|
AFMCharMetrics |
getChar(String name)
Returns the character metrics associated with the character name.
|
String |
getCharacterSet()
Returns the CharacterSet value.
|
int |
getCharCount()
Returns the number of character available for this font.
|
List |
getCharMetrics()
Returns the list of AFMCharMetrics instances representing all the available characters.
|
Number |
getDescender()
Returns the Descender value.
|
String |
getEncodingScheme()
Returns the EncodingScheme value.
|
String |
getFamilyName()
Returns the FamilyName value.
|
int |
getFirstChar()
Returns the first character index in the encoding that has a glyph.
|
RectangularShape |
getFontBBox()
Returns the FontBBox value.
|
int[] |
getFontBBoxAsIntArray()
Returns the FontBBox value as integer array.
|
String |
getFontName()
Returns the FontName value.
|
String |
getFullName()
Returns the FullName value.
|
int |
getLastChar()
Returns the last character index in the encoding that has a glyph.
|
Number |
getStdHW()
Returns the StdHW value.
|
Number |
getStdVW()
Returns the StdVW value.
|
String |
getWeight()
Returns the Weight value.
|
AFMWritingDirectionMetrics |
getWritingDirectionMetrics(int index)
Gets writing direction metrics.
|
Number |
getXHeight()
Returns the XHeight value.
|
boolean |
hasKerning()
Indicates whether the font has kerning information.
|
void |
setAscender(Number ascender)
Sets the Ascender value.
|
void |
setCapHeight(Number capHeight)
Sets the CapHeight value.
|
void |
setCharacterSet(String characterSet)
Sets the CharacterSet value.
|
void |
setDescender(Number descender)
Sets the Descender value.
|
void |
setEncodingScheme(String encodingScheme)
Sets the EncodingScheme value
|
void |
setFamilyName(String familyName)
Sets the FamilyName value.
|
void |
setFontBBox(RectangularShape fontBBox)
Sets the FontBBox value.
|
void |
setFontName(String fontName)
Sets the FontName value.
|
void |
setFullName(String fullName)
Sets the FullName value.
|
void |
setStdHW(Number stdHW)
Sets the StdHW value.
|
void |
setStdVW(Number stdVW)
Sets the StdVW value.
|
void |
setWeight(String weight)
Sets the Weight value.
|
void |
setWritingDirectionMetrics(int index,
AFMWritingDirectionMetrics metrics)
Sets writing direction metrics.
|
void |
setXHeight(Number height)
Sets the XHeight value.
|
String |
toString() |
public String getFontName()
public void setFontName(String fontName)
fontName
- the font name to setpublic String getFullName()
public void setFullName(String fullName)
fullName
- the full name to setpublic String getFamilyName()
public void setFamilyName(String familyName)
familyName
- the family name to setpublic String getWeight()
public void setWeight(String weight)
weight
- the weight to setpublic RectangularShape getFontBBox()
public int[] getFontBBoxAsIntArray()
public void setFontBBox(RectangularShape fontBBox)
fontBBox
- the fontBBox to setpublic String getEncodingScheme()
public void setEncodingScheme(String encodingScheme)
encodingScheme
- the encodingScheme to setpublic String getCharacterSet()
public void setCharacterSet(String characterSet)
characterSet
- the characterSet to setpublic Number getCapHeight()
public void setCapHeight(Number capHeight)
capHeight
- the capHeight to setpublic Number getXHeight()
public void setXHeight(Number height)
height
- the xHeight to setpublic Number getAscender()
public void setAscender(Number ascender)
ascender
- the ascender to setpublic Number getDescender()
public void setDescender(Number descender)
descender
- the descender to setpublic Number getStdHW()
public void setStdHW(Number stdHW)
stdHW
- the StdHW to setpublic Number getStdVW()
public void setStdVW(Number stdVW)
stdVW
- the StdVW to setpublic AFMWritingDirectionMetrics getWritingDirectionMetrics(int index)
index
- the writing direction (0, 1 or 2)public void setWritingDirectionMetrics(int index, AFMWritingDirectionMetrics metrics)
index
- the writing direction (0, 1 or 2)metrics
- the writing direction metricspublic void addCharMetrics(AFMCharMetrics metrics)
metrics
- the character metricspublic int getCharCount()
public int getFirstChar()
public int getLastChar()
public AFMCharMetrics getChar(String name)
name
- the character namepublic List getCharMetrics()
public void addXKerning(String name1, String name2, double kx)
name1
- the name of the first charactername2
- the name of the second characterkx
- kerning value in x-directionpublic boolean hasKerning()
public Map createXKerningMapEncoded()
Copyright © 2007-2019. All Rights Reserved.