org.apache.fop.render.afp.fonts
Class CharacterSetOrientation
java.lang.Object
org.apache.fop.render.afp.fonts.CharacterSetOrientation
public class CharacterSetOrientation
extends java.lang.Object
The IBM Font Object Content Architecture (FOCA) supports presentation
of character shapes by defining their characteristics, which include
Font-Description information for identifying the characters, Font-Metric
information for positioning the characters, and Character-Shape
information for presenting the character images.
Presenting a graphic character on a presentation surface requires
that you communicate this information clearly to rotate and position
characters correctly on the physical or logical page.
This class provides font metric information for a particular font
as by the orientation.
This information is obtained directly from the AFP font files which must
be installed in the classpath under in the location specified by the path
attribute in the afp-font.xml file.
CharacterSetOrientation(int orientation) - Constructor for the CharacterSetOrientation, the orientation is
expressed as the degrees rotation (i.e 0, 90, 180, 270)
|
int | getAscender() - Ascender height is the distance from the character baseline to the
top of the character box.
|
int | getCapHeight() - Cap height is the average height of the uppercase characters in
a font.
|
int | getDescender() - Descender depth is the distance from the character baseline to
the bottom of a character box.
|
int | getFirstChar() - The first character in the character set
|
int | getLastChar() - The last character in the character set
|
int | getOrientation() - The orientation for these metrics in the character set
|
int[] | getWidths() - Get the width (in 1/1000ths of a point size) of all characters
in this character set.
|
int | getXHeight() - XHeight refers to the height of the lower case letters above
the baseline.
|
void | setAscender(int ascender) - Ascender height is the distance from the character baseline to the
top of the character box.
|
void | setCapHeight(int capHeight) - Cap height is the average height of the uppercase characters in
a font.
|
void | setDescender(int descender) - Descender depth is the distance from the character baseline to
the bottom of a character box.
|
void | setFirstChar(int firstChar) - The first character in the character set
|
void | setLastChar(int lastChar) - The last character in the character set
|
void | setWidth(int character, int width) - Set the width (in 1/1000ths of a point size) of the character
identified by the parameter passed.
|
void | setXHeight(int xHeight) - XHeight refers to the height of the lower case letters above
the baseline.
|
int | width(int character) - Get the width (in 1/1000ths of a point size) of the character
identified by the parameter passed.
|
CharacterSetOrientation
public CharacterSetOrientation(int orientation)
Constructor for the CharacterSetOrientation, the orientation is
expressed as the degrees rotation (i.e 0, 90, 180, 270)
orientation
- the character set orientation
getAscender
public int getAscender()
Ascender height is the distance from the character baseline to the
top of the character box. A negative ascender height signifies that
all of the graphic character is below the character baseline. For
a character rotation other than 0, ascender height loses its
meaning when the character is lying on its side or is upside down
with respect to normal viewing orientation. For the general case,
Ascender Height is the character�s most positive y-axis value.
For bounded character boxes, for a given character having an
ascender, ascender height and baseline offset are equal.
- the ascender value in millipoints
getCapHeight
public int getCapHeight()
Cap height is the average height of the uppercase characters in
a font. This value is specified by the designer of a font and is
usually the height of the uppercase M.
- the cap height value in millipoints
getDescender
public int getDescender()
Descender depth is the distance from the character baseline to
the bottom of a character box. A negative descender depth signifies
that all of the graphic character is above the character baseline.
- the descender value in millipoints
getFirstChar
public int getFirstChar()
The first character in the character set
getLastChar
public int getLastChar()
The last character in the character set
getOrientation
public int getOrientation()
The orientation for these metrics in the character set
getWidths
public int[] getWidths()
Get the width (in 1/1000ths of a point size) of all characters
in this character set.
- the widths of all characters
getXHeight
public int getXHeight()
XHeight refers to the height of the lower case letters above
the baseline.
- heightX the typical height of characters
setAscender
public void setAscender(int ascender)
Ascender height is the distance from the character baseline to the
top of the character box. A negative ascender height signifies that
all of the graphic character is below the character baseline. For
a character rotation other than 0, ascender height loses its
meaning when the character is lying on its side or is upside down
with respect to normal viewing orientation. For the general case,
Ascender Height is the character�s most positive y-axis value.
For bounded character boxes, for a given character having an
ascender, ascender height and baseline offset are equal.
ascender
- the ascender to set
setCapHeight
public void setCapHeight(int capHeight)
Cap height is the average height of the uppercase characters in
a font. This value is specified by the designer of a font and is
usually the height of the uppercase M.
capHeight
- the cap height to set
setDescender
public void setDescender(int descender)
Descender depth is the distance from the character baseline to
the bottom of a character box. A negative descender depth signifies
that all of the graphic character is above the character baseline.
descender
- the descender value in millipoints
setFirstChar
public void setFirstChar(int firstChar)
The first character in the character set
firstChar
- the first character
setLastChar
public void setLastChar(int lastChar)
The last character in the character set
lastChar
- the last character
setWidth
public void setWidth(int character,
int width)
Set the width (in 1/1000ths of a point size) of the character
identified by the parameter passed.
character
- the character for which the width is being setwidth
- the widths of the character
setXHeight
public void setXHeight(int xHeight)
XHeight refers to the height of the lower case letters above
the baseline.
xHeight
- the typical height of characters
width
public int width(int character)
Get the width (in 1/1000ths of a point size) of the character
identified by the parameter passed.
character
- the character to evaluate
- the widths of the character
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.