fop 0.95

org.apache.fop.render.afp.fonts
Class FopCharacterSet

java.lang.Object
  extended by org.apache.fop.render.afp.fonts.CharacterSet
      extended by org.apache.fop.render.afp.fonts.FopCharacterSet

public class FopCharacterSet
extends CharacterSet

A Character set for a normal FOP font


Field Summary
 
Fields inherited from class org.apache.fop.render.afp.fonts.CharacterSet
codePage, encoding, log, name, path
 
Constructor Summary
FopCharacterSet(java.lang.String codePage, java.lang.String encoding, java.lang.String name, int size, Typeface charSet)
          Constructor for the CharacterSetMetric object, the character set is used to load the font information from the actual AFP font.
 
Method Summary
 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[] getWidths()
          Get the width (in 1/1000ths of a point size) of all characters
 int getXHeight()
          XHeight refers to the height of the lower case letters above the baseline.
 char mapChar(char c)
          Map a Unicode character to a code point in the font.
 int width(int character)
          Get the width (in 1/1000ths of a point size) of the character identified by the parameter passed.
 
Methods inherited from class org.apache.fop.render.afp.fonts.CharacterSet
addCharacterSetOrientation, getCodePage, getEncoding, getName, getNameBytes, getPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FopCharacterSet

public FopCharacterSet(java.lang.String codePage,
                       java.lang.String encoding,
                       java.lang.String name,
                       int size,
                       Typeface charSet)
Constructor for the CharacterSetMetric object, the character set is used to load the font information from the actual AFP font.

Parameters:
codePage - the code page identifier
encoding - the encoding of the font
name - the character set name
size - the font size
charSet - the fop character set
Method Detail

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.

Overrides:
getAscender in class CharacterSet
Returns:
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.

Overrides:
getCapHeight in class CharacterSet
Returns:
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.

Overrides:
getDescender in class CharacterSet
Returns:
the descender value in millipoints

getFirstChar

public int getFirstChar()
The first character in the character set

Overrides:
getFirstChar in class CharacterSet
Returns:
the first character

getLastChar

public int getLastChar()
The last character in the character set

Overrides:
getLastChar in class CharacterSet
Returns:
the last character

getWidths

public int[] getWidths()
Get the width (in 1/1000ths of a point size) of all characters

Overrides:
getWidths in class CharacterSet
Returns:
the widths of all characters

getXHeight

public int getXHeight()
XHeight refers to the height of the lower case letters above the baseline.

Overrides:
getXHeight in class CharacterSet
Returns:
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.

Overrides:
width in class CharacterSet
Parameters:
character - the character from which the width will be calculated
Returns:
the width of the character

mapChar

public char mapChar(char c)
Map a Unicode character to a code point in the font.

Overrides:
mapChar in class CharacterSet
Parameters:
c - character to map
Returns:
the mapped character

fop 0.95

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.