org.apache.fop.fonts

Class SingleByteFont

Implemented Interfaces:
FontDescriptor, FontMetrics, MutableFont

public class SingleByteFont
extends CustomFont

Generic SingleByte font

Constructor Summary

SingleByteFont()
Main constructor.

Method Summary

char[]
getCharsUsed()
String
getEncoding()
int
getWidth(int i, int size)
int[]
getWidths()
boolean
hasChar(char c)
boolean
isEmbeddable()
char
mapChar(char c)
void
setEncoding(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, getFontSubName, getFontType, getItalicAngle, getKerningInfo, getLastChar, getMissingWidth, getStemV, getStrippedFontName, getXHeight, hasKerningInfo, isKerningEnabled, putKerningEntry, setAscender, setCapHeight, setDescender, setEmbedFileName, setEmbedResourceName, setFirstChar, setFlags, setFontBBox, setFontName, setFontSubFamilyName, setFontType, setItalicAngle, setKerningEnabled, setLastChar, setMissingWidth, setResolver, setStemV, setXHeight

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

getEncoding, getMaxAscent, hasChar, isMultiByte, mapChar

Constructor Details

SingleByteFont

public SingleByteFont()
Main constructor.

Method Details

getCharsUsed

public char[] getCharsUsed()

getEncoding

public String getEncoding()
Overrides:
getEncoding in interface Typeface

getWidth

public int getWidth(int i,
                    int size)
Specified by:
getWidth in interface FontMetrics

getWidths

public int[] getWidths()
Specified by:
getWidths in interface FontMetrics

hasChar

public boolean hasChar(char c)
Overrides:
hasChar in interface Typeface

isEmbeddable

public boolean isEmbeddable()
Specified by:
isEmbeddable in interface FontDescriptor

mapChar

public char mapChar(char c)
Overrides:
mapChar in interface Typeface

setEncoding

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

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

updateMapping

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

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