Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

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

All Implemented Interfaces:
  FontMetrics

Direct Known Subclasses:
  DoubleByteFont, OutlineFont

    public abstract class AbstractOutlineFont

extends AFPFont

A font defined as a set of lines and curves as opposed to a bitmap font. An outline font can be scaled to any size and otherwise transformed more easily than a bitmap font, and with more attractive results.

Field Summary
`protected CharacterSet` | `charSet` The character set for this font

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
`AbstractOutlineFont(java.lang.String name, CharacterSet charSet)` Constructor for an outline font.

Method Summary
`int` | `getAscender(int size)` The ascender is the part of a lowercase letter that extends above the "x-height" (the height of the letter "x"), such as "d", "t", or "h".
`int` | `getCapHeight(int size)` Obtains the height of capital letters for the specified point size.
`CharacterSet` | `getCharacterSet()` Get the character set metrics.
`CharacterSet` | `getCharacterSet(int size)` Get the character set metrics.
`int` | `getDescender(int size)` The descender is the part of a lowercase letter that extends below the base line, such as "g", "j", or "p".
`java.lang.String` | `getEncodingName()` Get the encoding of the font.
`int` | `getFirstChar()` Get the first character in this font.
`int` | `getLastChar()` Get the last character in this font.
`int` | `getWidth(int character, int size)` Obtain the width of the character for the specified point size.
`int[]` | `getWidths()` Get the getWidth (in 1/1000ths of a point size) of all characters in this character set.
`int[]` | `getWidths(int size)` Get the getWidth (in 1/1000ths of a point size) of all characters in this character set.
`int` | `getXHeight(int size)` The "x-height" (the height of the letter "x").
`boolean` | `hasChar(char c)` Determines whether this font contains a particular character/glyph.
`char` | `mapChar(char c)` Map a Unicode character to a code point in the font.

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`

Field Detail

### charSet

    protected CharacterSet charSet

  The character set for this font

Constructor Detail

### AbstractOutlineFont

    public AbstractOutlineFont(java.lang.String name,
                               CharacterSet charSet)

  Constructor for an outline font.

  Parameters:
    `name` - the name of the font
    `charSet` - the chracter set

Method Detail

### getCharacterSet

    public CharacterSet getCharacterSet()

  Get the character set metrics.

  Returns:
    the character set

### getCharacterSet

    public CharacterSet getCharacterSet(int size)

  Get the character set metrics.

  Specified by:
    `getCharacterSet` in class `AFPFont`
  Parameters:
    `size` - ignored
  Returns:
    the character set

### getFirstChar

    public int getFirstChar()

  Get the first character in this font.

  Returns:
    the first character in this font

### getLastChar

    public int getLastChar()

  Get the last character in this font.

  Returns:
    the last character in this font

### getAscender

    public int getAscender(int size)

  The ascender is the part of a lowercase letter that extends above the "x-height" (the height of the letter "x"), such as "d", "t", or "h". Also used to denote the part of the letter extending above the x-height.

  Parameters:
    `size` - the font size (in mpt)
  Returns:
    the ascender for the given size

### getCapHeight

    public int getCapHeight(int size)

  Obtains the height of capital letters for the specified point size.

  Parameters:
    `size` - the font size (in mpt)
  Returns:
    the cap height for the given size

### getDescender

    public int getDescender(int size)

  The descender is the part of a lowercase letter that extends below the base line, such as "g", "j", or "p". Also used to denote the part of the letter extending below the base line.

  Parameters:
    `size` - the font size (in mpt)
  Returns:
    the descender for the given size

### getXHeight

    public int getXHeight(int size)

  The "x-height" (the height of the letter "x").

  Parameters:
    `size` - the font size (in mpt)
  Returns:
    the x height for the given size

### getWidth

    public int getWidth(int character,
                        int size)

  Obtain the width of the character for the specified point size.

  Parameters:
    `character` - the character
    `size` - the font size (in mpt)
  Returns:
    the width of the character for the specified point size

### getWidths

    public int[] getWidths(int size)

  Get the getWidth (in 1/1000ths of a point size) of all characters in this character set.

  Parameters:
    `size` - the font size (in mpt)
  Returns:
    the widths of all characters

### getWidths

    public int[] getWidths()

  Get the getWidth (in 1/1000ths of a point size) of all characters in this character set.

  Returns:
    the widths of all characters

### hasChar

    public boolean hasChar(char c)

  Determines whether this font contains a particular character/glyph.

  Specified by:
    `hasChar` in class `Typeface`
  Parameters:
    `c` - character to check
  Returns:
    True if the character is supported, Falso otherwise

### mapChar

    public char mapChar(char c)

  Map a Unicode character to a code point in the font.

  Specified by:
    `mapChar` in class `Typeface`
  Parameters:
    `c` - character to map
  Returns:
    the mapped character

### getEncodingName

    public java.lang.String getEncodingName()

  Get the encoding of the font.

  Specified by:
    `getEncodingName` in class `Typeface`
  Returns:
    the encoding

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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