|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.afp.fonts.CharacterSetBuilder
public abstract class CharacterSetBuilder
The CharacterSetBuilder is responsible building the a CharacterSet instance that holds
the font metric data. The data is either read from disk and passed to a CharacterSet (*)
or a FopCharacterSet is instantiated that is composed of a Typeface instance configured
with this data.
-*- For referenced fonts CharacterSetBuilder is responsible for reading the font attributes
from binary code page files and the character set metric files. In IBM font structure, a
code page maps each character of text to the characters in a character set.
Each character is translated into a code point. When the character is
printed, each code point is matched to a character ID on the code page
specified. The character ID is then matched to the image (raster pattern or
outline pattern) of the character in the character set specified. The image
in the character set is the image that is printed in the document. To be a
valid code page for a particular character set, all character IDs in the code
page must be included in that character set.
This class will read the font information from the binary code page files and character
set metric files in order to determine the correct metrics to use when rendering the
formatted object.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
LOG
Static logging instance |
Method Summary | |
---|---|
CharacterSet |
build(java.lang.String characterSetName,
java.lang.String codePageName,
java.lang.String encoding,
Typeface typeface,
AFPEventProducer eventProducer)
Load the font details and metrics into the CharacterSetMetric object, this will use the actual afp code page and character set files to load the object with the necessary metrics. |
CharacterSet |
build(java.lang.String characterSetName,
java.lang.String codePageName,
java.lang.String encoding,
Typeface typeface,
AFPResourceAccessor accessor,
AFPEventProducer eventProducer)
|
CharacterSet |
buildDBCS(java.lang.String characterSetName,
java.lang.String codePageName,
java.lang.String encoding,
CharacterSetType charsetType,
AFPResourceAccessor accessor,
AFPEventProducer eventProducer)
Load the font details and metrics into the CharacterSetMetric object, this will use the actual afp code page and character set files to load the object with the necessary metrics. |
CharacterSet |
buildSBCS(java.lang.String characterSetName,
java.lang.String codePageName,
java.lang.String encoding,
AFPResourceAccessor accessor,
AFPEventProducer eventProducer)
Load the font details and metrics into the CharacterSetMetric object, this will use the actual afp code page and character set files to load the object with the necessary metrics. |
static CharacterSetBuilder |
getDoubleByteInstance()
Factory method for the double-byte (CID Keyed font (Type 0)) implementation of AFPFontReader. |
static CharacterSetBuilder |
getSingleByteInstance()
Factory method for the single-byte implementation of AFPFontReader. |
protected java.util.Map<java.lang.String,java.lang.String> |
loadCodePage(java.lang.String codePage,
java.lang.String encoding,
AFPResourceAccessor accessor,
AFPEventProducer eventProducer)
Load the code page information from the appropriate file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log LOG
Method Detail |
---|
public static CharacterSetBuilder getSingleByteInstance()
public static CharacterSetBuilder getDoubleByteInstance()
public CharacterSet buildSBCS(java.lang.String characterSetName, java.lang.String codePageName, java.lang.String encoding, AFPResourceAccessor accessor, AFPEventProducer eventProducer) throws java.io.IOException
characterSetName
- name of the charactersetcodePageName
- name of the code page fileencoding
- encoding nameaccessor
- used to load codepage and characterseteventProducer
- for handling AFP related events
java.io.IOException
- if an I/O error occurspublic CharacterSet buildDBCS(java.lang.String characterSetName, java.lang.String codePageName, java.lang.String encoding, CharacterSetType charsetType, AFPResourceAccessor accessor, AFPEventProducer eventProducer) throws java.io.IOException
characterSetName
- name of the charactersetcodePageName
- name of the code page fileencoding
- encoding namecharsetType
- the characterset typeaccessor
- used to load codepage and characterseteventProducer
- for handling AFP related events
java.io.IOException
- if an I/O error occurspublic CharacterSet build(java.lang.String characterSetName, java.lang.String codePageName, java.lang.String encoding, Typeface typeface, AFPEventProducer eventProducer) throws java.io.IOException
characterSetName
- the CharacterSetMetric object to populatecodePageName
- the name of the code page to useencoding
- name of the encoding in usetypeface
- base14 font nameeventProducer
- for handling AFP related events
java.io.IOException
- if an I/O error occurspublic CharacterSet build(java.lang.String characterSetName, java.lang.String codePageName, java.lang.String encoding, Typeface typeface, AFPResourceAccessor accessor, AFPEventProducer eventProducer) throws java.io.IOException
java.io.IOException
protected java.util.Map<java.lang.String,java.lang.String> loadCodePage(java.lang.String codePage, java.lang.String encoding, AFPResourceAccessor accessor, AFPEventProducer eventProducer) throws java.io.IOException
codePage
- the code page identifierencoding
- the encoding to use for the character decodingaccessor
- the resource accessoreventProducer
- for handling AFP related events
java.io.IOException
- if an I/O exception of some sort has occurred.
|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |