org.apache.fop.fonts
public class SingleByteFont extends CustomFont
Constructor and Description |
---|
SingleByteFont()
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
CodePointMapping |
getCodePointMapping()
Returns the code point mapping (encoding) of this font.
|
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(CodePointMapping encoding)
Sets the encoding of 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(java.lang.String encoding)
Updates the mapping variable based on the encoding.
|
getAscender, getAscender, getCapHeight, getCapHeight, getDescender, getDescender, getEmbedFileName, getEmbedFileSource, getEmbedFontName, getEmbedResourceName, getFamilyNames, getFirstChar, getFlags, getFontBBox, getFontName, getFontSubName, getFontType, getFullName, getItalicAngle, getKerningInfo, getLastChar, getMissingWidth, getStemV, getStrippedFontName, getWeight, getXHeight, hasKerningInfo, isKerningEnabled, isSymbolicFont, putKerningEntry, replaceKerningMap, setAscender, setCapHeight, setDescender, setEmbedFileName, setEmbedResourceName, setFamilyNames, setFirstChar, setFlags, setFontBBox, setFontName, setFontSubFamilyName, setFontType, setFullName, setItalicAngle, setKerningEnabled, setLastChar, setMissingWidth, setResolver, setStemV, setWeight, setXHeight
getMaxAscent, hadMappingOperations, isMultiByte, notifyMapOperation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMaxAscent
public boolean isEmbeddable()
public java.lang.String getEncoding()
getEncoding
in class Typeface
public CodePointMapping getCodePointMapping()
public int getWidth(int i, int size)
i
- code point indexsize
- font sizepublic int[] getWidths()
This is used to get an array for inserting in an output format. It should not be used for lookup.
public char mapChar(char c)
public boolean hasChar(char c)
protected void updateMapping(java.lang.String encoding)
encoding
- the name of the encodingpublic void setEncoding(java.lang.String encoding)
encoding
- the encoding (ex. "WinAnsiEncoding" or "SymbolEncoding")public void setEncoding(CodePointMapping encoding)
encoding
- the encoding informationpublic void setWidth(int index, int width)
index
- index of the characterwidth
- the width of the characterCopyright 1999-2008 The Apache Software Foundation. All Rights Reserved.