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

## org.apache.fop.fonts.type1
Class AFMCharMetrics

    java.lang.Object
      org.apache.fop.fonts.type1.AFMCharMetrics

    public class AFMCharMetrics

extends java.lang.Object

Holds the metrics of a single character from an AFM file.

Constructor Summary
`AFMCharMetrics()`

Method Summary
`java.awt.Rectangle` | `getBBox()` Returns the character's bounding box.
`NamedCharacter` | `getCharacter()` Returns the named character represented by this instance.
`int` | `getCharCode()` Returns the character code.
`java.lang.String` | `getCharName()` Returns the PostScript character name.
`java.lang.String` | `getUnicodeSequence()` Returns the Unicode sequence for this character.
`double` | `getWidthX()` Returns the progression dimension in x-direction.
`double` | `getWidthY()` Returns the progression dimension in y-direction.
`boolean` | `hasCharCode()` Indicates whether the character has a character code, i.e.
`void` | `setBBox(java.awt.Rectangle box)` Sets the character's bounding box.
`void` | `setCharacter(NamedCharacter ch)` Sets the named character represented by this instance.
`void` | `setCharacter(java.lang.String charName, java.lang.String unicodeSequence)` Sets the named character represented by this instance.
`void` | `setCharCode(int charCode)` Sets the character code.
`void` | `setWidthX(double widthX)` Sets the progression dimension in x-direction
`void` | `setWidthY(double widthY)` Sets the progression dimension in y-direction
`java.lang.String` | `toString()`

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

Constructor Detail

### AFMCharMetrics

    public AFMCharMetrics()

Method Detail

### getCharCode

    public int getCharCode()

  Returns the character code.

  Returns:
    the charCode (-1 if not part of the encoding)

### hasCharCode

    public boolean hasCharCode()

  Indicates whether the character has a character code, i.e. is part of the default encoding.

  Returns:
    true if there is a character code.

### setCharCode

    public void setCharCode(int charCode)

  Sets the character code.

  Parameters:
    `charCode` - the charCode to set

### getCharacter

    public NamedCharacter getCharacter()

  Returns the named character represented by this instance.

  Returns:
    the named character (or null if no named character is associated)

### setCharacter

    public void setCharacter(NamedCharacter ch)

  Sets the named character represented by this instance.

  Parameters:
    `ch` - the named character

### setCharacter

    public void setCharacter(java.lang.String charName,
                             java.lang.String unicodeSequence)

  Sets the named character represented by this instance.

  Parameters:
    `charName` - the character name (as defined in the Adobe glyph list)
    `unicodeSequence` - the Unicode sequence

### getUnicodeSequence

    public java.lang.String getUnicodeSequence()

  Returns the Unicode sequence for this character.

  Returns:
    the Unicode characters (or null if no such Unicode sequence exists for this character)

### getCharName

    public java.lang.String getCharName()

  Returns the PostScript character name.

  Returns:
    the charName (or null if no character name is associated)

### getWidthX

    public double getWidthX()

  Returns the progression dimension in x-direction.

  Returns:
    the widthX

### setWidthX

    public void setWidthX(double widthX)

  Sets the progression dimension in x-direction

  Parameters:
    `widthX` - the widthX to set

### getWidthY

    public double getWidthY()

  Returns the progression dimension in y-direction.

  Returns:
    the widthY

### setWidthY

    public void setWidthY(double widthY)

  Sets the progression dimension in y-direction

  Parameters:
    `widthY` - the widthY to set

### getBBox

    public java.awt.Rectangle getBBox()

  Returns the character's bounding box.

  Returns:
    the bounding box (or null if it isn't available)

### setBBox

    public void setBBox(java.awt.Rectangle box)

  Sets the character's bounding box.

  Parameters:
    `box` - the bounding box

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

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

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