fop 1.1

## org.apache.fop.afp.fonts
Class AFPFont

    java.lang.Object
      org.apache.fop.fonts.Typeface
          org.apache.fop.afp.fonts.AFPFont

All Implemented Interfaces:
  FontMetrics

Direct Known Subclasses:
  AbstractOutlineFont, 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 java.lang.String` `name` The font name

Fields inherited from class org.apache.fop.fonts.Typeface
`eventListener, NOT_FOUND`

Constructor Summary
`AFPFont(java.lang.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
`java.lang.String` `getEmbedFontName()` Returns the font name for font embedding (may include a prefix, Example: "1E28bcArialMT").
`java.util.Set<java.lang.String>` `getFamilyNames()` Returns the font's family names as a Set of Strings (Example: "Helvetica").
`java.lang.String` `getFontName()` Returns the "PostScript" font name (Example: "Helvetica-BoldOblique").
`FontType` `getFontType()` Returns the type of the font.
`java.lang.String` `getFullName()` Returns the font's full name (Example: "Helvetica Bold Oblique").
`java.util.Map` `getKerningInfo()` Returns the kerning map for the font.
`boolean` `hasKerningInfo()` Indicates if the font has kerning information.
`boolean` `isEmbeddable()` Indicates if this font may be embedded.
`void` `setEmbeddable(boolean value)` Controls whether this font is embeddable or not.
`java.lang.String` `toString()`
`protected static char` `toUnicodeCodepoint(int character)` Maps mapped code points to Unicode code points.

Methods inherited from class org.apache.fop.fonts.Typeface
`getEncodingName, getMaxAscent, hadMappingOperations, hasChar, isMultiByte, mapChar, notifyMapOperation, setEventListener, warnMissingGlyph`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.apache.fop.fonts.FontMetrics
`getAscender, getCapHeight, getDescender, getWidth, getWidths, getXHeight`

Field Detail

### name

    protected java.lang.String name

  The font name

Constructor Detail

### AFPFont

    public AFPFont(java.lang.String name)

  Constructor for the base font requires the name.

  Parameters:
    `name` - the name of the font

Method Detail

### getFontName

    public java.lang.String getFontName()

  Returns the "PostScript" font name (Example: "Helvetica-BoldOblique").

  Returns:
    the font name

### getEmbedFontName

    public java.lang.String getEmbedFontName()

  Returns the font name for font embedding (may include a prefix, Example: "1E28bcArialMT").

  Returns:
    the name for font embedding

### getFullName

    public java.lang.String getFullName()

  Returns the font's full name (Example: "Helvetica Bold Oblique").

  Returns:
    the font's full name

### getFamilyNames

    public java.util.Set<java.lang.String> getFamilyNames()

  Returns the font's family names as a Set of Strings (Example: "Helvetica").

  Returns:
    the font's family names (a Set of Strings)

### getFontType

    public FontType getFontType()

  Returns the type of the font.

  Returns:
    the font type

### hasKerningInfo

    public boolean hasKerningInfo()

  Indicates if the font has kerning information.

  Returns:
    True, if kerning is available.

### getKerningInfo

    public java.util.Map getKerningInfo()

  Returns the kerning map for the font.

  Returns:
    the kerning map

### 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

### setEmbeddable

    public void setEmbeddable(boolean value)

  Controls whether this font is embeddable or not.

  Parameters:
    `value` - true to enable embedding, false otherwise.

### isEmbeddable

    public boolean isEmbeddable()

  Indicates if this font may be embedded.

  Returns:
    True, if embedding is possible/permitted

### toUnicodeCodepoint

    protected static final char toUnicodeCodepoint(int character)

  Maps mapped code points to Unicode code points.

  Parameters:
    `character` - the mapped code point
  Returns:
    the corresponding Unicode code point

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `Typeface`

fop 1.1

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