org.apache.fop.render.afp.fonts

Class AFPFont

Implemented Interfaces:
FontMetrics
Known Direct Subclasses:
OutlineFont, RasterFont

public abstract class AFPFont
extends Typeface

All implementations 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
getEmbedFontName()
Set
getFamilyNames()
String
getFontName()
FontType
getFontType()
Returns the type of the font.
String
getFullName()
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 kerning information.

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

getEncoding, getMaxAscent, hadMappingOperations, hasChar, isMultiByte, mapChar, notifyMapOperation

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

getEmbedFontName

public String getEmbedFontName()
Specified by:
getEmbedFontName in interface FontMetrics

getFamilyNames

public Set getFamilyNames()
Specified by:
getFamilyNames in interface FontMetrics

getFontName

public String getFontName()
Specified by:
getFontName in interface FontMetrics

getFontType

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

getFullName

public String getFullName()
Specified by:
getFullName in interface FontMetrics

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, False otherwise

hasKerningInfo

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

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