org.apache.fop.fonts.type1
Class PFMFile
java.lang.Object
org.apache.fop.fonts.type1.PFMFile
public class PFMFile
extends java.lang.Object
This class represents a PFM file (or parts of it) as a Java object.
protected Log | log - logging instance
|
int | getCapHeight() - Returns the CapHeight parameter for the font (height of uppercase H).
|
short | getCharSet() - Returns the charset used for the font.
|
String | getCharSetName() - Returns the charset of the font as a string.
|
int | getCharWidth(short which) - Returns the width of a character
|
short | getFirstChar() - Returns the number of the character that defines
the first entry in the widths list.
|
int | getFlags() - Returns the characteristics flags for the font as
needed for a PDF font descriptor (See PDF specs).
|
int[] | getFontBBox() - Returns the bounding box for the font.
|
boolean | getIsProportional() - Tells whether the font has proportional character spacing.
|
int | getItalicAngle() - Returns the italic angle of the font.
|
Map | getKerning() - Return the kerning table.
|
short | getLastChar() - Returns the number of the character that defines
the last entry in the widths list.
|
int | getLowerCaseAscent() - Returns the LowerCaseAscent parameter for the font (height of lowercase d).
|
int | getLowerCaseDescent() - Returns the LowerCaseDescent parameter for the font (height of lowercase p).
|
String | getPostscriptName() - Returns the Postscript name of the font.
|
int | getStemV() - Returns the width of the dominant vertical stems of the font.
|
String | getWindowsName() - Returns the Windows name of the font.
|
int | getXHeight() - Returns the XHeight parameter for the font (height of lowercase x).
|
boolean | isNonSymbolic() - Indicates whether the font is non-symbolic (Font uses the Adobe standard Latin character
set or a subset of it).
|
void | load(InputStream inStream) - Parses a PFM file
|
log
protected Log log
logging instance
getCapHeight
public int getCapHeight()
Returns the CapHeight parameter for the font (height of uppercase H).
getCharSet
public short getCharSet()
Returns the charset used for the font.
getCharSetName
public String getCharSetName()
Returns the charset of the font as a string.
getCharWidth
public int getCharWidth(short which)
Returns the width of a character
which
- The number of the character for which the width is requested.
- The width of a character.
getFirstChar
public short getFirstChar()
Returns the number of the character that defines
the first entry in the widths list.
- The number of the first character.
getFlags
public int getFlags()
Returns the characteristics flags for the font as
needed for a PDF font descriptor (See PDF specs).
- The characteristics flags.
getFontBBox
public int[] getFontBBox()
Returns the bounding box for the font.
Note: this value is just an approximation,
it does not really exist in the PFM file.
- The calculated Font BBox.
getIsProportional
public boolean getIsProportional()
Tells whether the font has proportional character spacing.
- ex. true for Times, false for Courier.
getItalicAngle
public int getItalicAngle()
Returns the italic angle of the font.
Note: this value is just an approximation,
it does not really exist in the PFM file.
getKerning
public Map getKerning()
Return the kerning table. The kerning table is a Map with
strings with glyphnames as keys, containing Maps as value.
The value map contains a glyph name string key and an Integer value
- A Map containing the kerning table
getLastChar
public short getLastChar()
Returns the number of the character that defines
the last entry in the widths list.
- The number of the last character.
getLowerCaseAscent
public int getLowerCaseAscent()
Returns the LowerCaseAscent parameter for the font (height of lowercase d).
- The LowerCaseAscent parameter.
getLowerCaseDescent
public int getLowerCaseDescent()
Returns the LowerCaseDescent parameter for the font (height of lowercase p).
- The LowerCaseDescent parameter.
getPostscriptName
public String getPostscriptName()
Returns the Postscript name of the font.
getStemV
public int getStemV()
Returns the width of the dominant vertical stems of the font.
Note: this value is just an approximation,
it does not really exist in the PFM file.
getWindowsName
public String getWindowsName()
Returns the Windows name of the font.
getXHeight
public int getXHeight()
Returns the XHeight parameter for the font (height of lowercase x).
isNonSymbolic
public boolean isNonSymbolic()
Indicates whether the font is non-symbolic (Font uses the Adobe standard Latin character
set or a subset of it).
- true if the font is non-symbolic
load
public void load(InputStream inStream)
throws IOException
Parses a PFM file
inStream
- The stream from which to read the PFM file.
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.