org.apache.fop.render.afp.fonts

Class AFPFont

Implemented Interfaces:
FontMetrics
Known Direct Subclasses:
OutlineFont, RasterFont

public abstract class AFPFont
extends Typeface

All implemenations of AFP fonts should extend this base class, the object implements the FontMetrics information.

Field Summary

protected String
_name
The font name

Constructor Summary

AFPFont(String name)
Constructor for the base font requires the name.

Method Summary

abstract CharacterSet
getCharacterSet(int size)
Returns the character set for a given size
String
getFontName()
FontType
getFontType()
Returns the type of the font.
Map
getKerningInfo()
Returns the kerning map for the font.
boolean
hasChar(char c)
Determines whether this font contains a particular character/glyph.
boolean
hasKerningInfo()
Indicates if the font has kering information.

Methods inherited from class org.apache.fop.fonts.Typeface

getEncoding, getMaxAscent, hasChar, isMultiByte, mapChar

Field Details

_name

protected String _name
The font name

Constructor Details

AFPFont

public AFPFont(String name)
Constructor for the base font requires the name.
Parameters:
name - the name of the font

Method Details

getCharacterSet

public abstract CharacterSet getCharacterSet(int size)
Returns the character set for a given size
Parameters:
size - the font size
Returns:
the character set object

getFontName

public String getFontName()
Specified by:
getFontName in interface FontMetrics
Returns:
the name of the font.

getFontType

public FontType getFontType()
Returns the type of the font.
Specified by:
getFontType in interface FontMetrics
Returns:
the font type

getKerningInfo

public Map getKerningInfo()
Returns the kerning map for the font.
Specified by:
getKerningInfo in interface FontMetrics
Returns:
the kerning map

hasChar

public boolean hasChar(char c)
Determines whether this font contains a particular character/glyph.
Overrides:
hasChar in interface Typeface
Parameters:
c - character to check
Returns:
True if the character is supported, Falso otherwise

hasKerningInfo

public boolean hasKerningInfo()
Indicates if the font has kering information.
Specified by:
hasKerningInfo in interface FontMetrics
Returns:
True, if kerning is available.

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