fop 0.92beta

org.apache.fop.fonts
Class SingleByteFont

java.lang.Object
  |
  +--org.apache.fop.fonts.Typeface
        |
        +--org.apache.fop.fonts.CustomFont
              |
              +--org.apache.fop.fonts.SingleByteFont
All Implemented Interfaces:
FontDescriptor, FontMetrics, MutableFont

public class SingleByteFont
extends CustomFont

Generic SingleByte font


Constructor Summary
SingleByteFont()
          Main constructor.
 
Method Summary
 java.lang.String getEncoding()
          Get the encoding of the font.
 int getWidth(int i, int size)
          Return the width (in 1/1000ths of point size) of the character at code point i.
 int[] getWidths()
          Return the array of widths.
 boolean hasChar(char c)
          Determines whether this font contains a particular character/glyph.
 boolean isEmbeddable()
          Indicates if this font may be embedded.
 char mapChar(char c)
          Map a Unicode character to a code point in the font.
 void setEncoding(java.lang.String encoding)
          Sets the encoding of the font.
 void setWidth(int index, int width)
          Sets a width for a character.
protected  void updateMapping()
          Updates the mapping variable based on the encoding.
 
Methods inherited from class org.apache.fop.fonts.CustomFont
getAscender, getAscender, getCapHeight, getCapHeight, getDescender, getDescender, getEmbedFileName, getEmbedFileSource, getEmbedResourceName, getFirstChar, getFlags, getFontBBox, getFontName, getFontType, getItalicAngle, getKerningInfo, getLastChar, getMissingWidth, getStemV, getXHeight, hasKerningInfo, isKerningEnabled, putKerningEntry, setAscender, setCapHeight, setDescender, setEmbedFileName, setEmbedResourceName, setFirstChar, setFlags, setFontBBox, setFontName, setFontType, setItalicAngle, setKerningEnabled, setLastChar, setMissingWidth, setResolver, setStemV, setXHeight
 
Methods inherited from class org.apache.fop.fonts.Typeface
isMultiByte
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleByteFont

public SingleByteFont()
Main constructor.
Method Detail

updateMapping

protected void updateMapping()
Updates the mapping variable based on the encoding.

isEmbeddable

public boolean isEmbeddable()
Description copied from interface: FontDescriptor
Indicates if this font may be embedded.
See Also:
FontDescriptor.isEmbeddable()

getEncoding

public java.lang.String getEncoding()
Description copied from class: Typeface
Get the encoding of the font.
Overrides:
getEncoding in class Typeface
See Also:
Typeface.getEncoding()

setEncoding

public void setEncoding(java.lang.String encoding)
Sets the encoding of the font.
Parameters:
encoding - the encoding (ex. "WinAnsiEncoding" or "SymbolEncoding")

getWidth

public int getWidth(int i,
                    int size)
Description copied from interface: FontMetrics
Return the width (in 1/1000ths of point size) of the character at code point i.
See Also:
FontMetrics.getWidth(int, int)

getWidths

public int[] getWidths()
Description copied from interface: FontMetrics
Return the array of widths.

This is used to get an array for inserting in an output format. It should not be used for lookup.

See Also:
FontMetrics.getWidths()

mapChar

public char mapChar(char c)
Description copied from class: Typeface
Map a Unicode character to a code point in the font.
Overrides:
mapChar in class Typeface
See Also:
Typeface.mapChar(char)

hasChar

public boolean hasChar(char c)
Description copied from class: Typeface
Determines whether this font contains a particular character/glyph.
Overrides:
hasChar in class Typeface
See Also:
Typeface.hasChar(char)

setWidth

public void setWidth(int index,
                     int width)
Sets a width for a character.
Parameters:
index - index of the character
width - the width of the character

fop 0.92beta

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