fop 1.0

org.apache.fop.afp.fonts
Class DoubleByteFont

java.lang.Object
  extended by org.apache.fop.fonts.Typeface
      extended by org.apache.fop.afp.fonts.AFPFont
          extended by org.apache.fop.afp.fonts.AbstractOutlineFont
              extended by org.apache.fop.afp.fonts.DoubleByteFont
All Implemented Interfaces:
FontMetrics

public class DoubleByteFont
extends AbstractOutlineFont

Implementation of AbstractOutlineFont that supports double-byte fonts (CID Keyed font (Type 0)). The width of characters that are not prescribed a width metrics in the font resource use a fallback width. The default width is 1 em. A character can be supplied and queried for the fallback width of all non-ideograph characters.


Field Summary
 
Fields inherited from class org.apache.fop.afp.fonts.AbstractOutlineFont
charSet
 
Fields inherited from class org.apache.fop.afp.fonts.AFPFont
name
 
Fields inherited from class org.apache.fop.fonts.Typeface
eventListener, NOT_FOUND
 
Constructor Summary
DoubleByteFont(java.lang.String name, CharacterSet charSet)
          Constructor for an double-byte outline font.
 
Method Summary
 int getWidth(int character, int size)
          Obtain the width of the character for the specified point size.
 
Methods inherited from class org.apache.fop.afp.fonts.AbstractOutlineFont
getAscender, getCapHeight, getCharacterSet, getCharacterSet, getDescender, getEncodingName, getFirstChar, getLastChar, getWidths, getWidths, getXHeight, hasChar, mapChar
 
Methods inherited from class org.apache.fop.afp.fonts.AFPFont
getEmbedFontName, getFamilyNames, getFontName, getFontType, getFullName, getKerningInfo, hasKerningInfo, isEmbeddable, setEmbeddable, toString, toUnicodeCodepoint
 
Methods inherited from class org.apache.fop.fonts.Typeface
getMaxAscent, hadMappingOperations, isMultiByte, notifyMapOperation, setEventListener, warnMissingGlyph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoubleByteFont

public DoubleByteFont(java.lang.String name,
                      CharacterSet charSet)
Constructor for an double-byte outline font.

Parameters:
name - the name of the font
charSet - the character set
Method Detail

getWidth

public int getWidth(int character,
                    int size)
Obtain the width of the character for the specified point size.

Specified by:
getWidth in interface FontMetrics
Overrides:
getWidth in class AbstractOutlineFont
Parameters:
character - the character
size - the font size (in mpt)
Returns:
the width of the character for the specified point size

fop 1.0

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