|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.freehep.graphicsio.font.FontIncluder
Instances of this class write the information into documents
(ps or pdf) that is necessary in order to include or embed fonts.
In order to guarantee a time-invariant interface the main methods to implement
by subclasses includeFont takes no arguments. All necessary data should
be available by getter methods which can easily be added.
The abstract methods are called in the following order:
Field Summary | |
static double |
FONT_SIZE
|
Constructor Summary | |
FontIncluder(FontRenderContext context)
|
Method Summary | |
protected void |
closeIncludeFont()
Does nothing, but can be implemented by subclasses if necessary. |
protected String |
getCharName(int i)
|
protected FontRenderContext |
getContext()
|
protected CharTable |
getEncodingTable()
|
protected Font |
getFont()
|
protected Rectangle2D |
getFontBBox()
|
protected String |
getFontName()
|
protected int |
getNODefinedChars()
|
protected double |
getUndefinedWidth()
|
protected char[] |
getUnicode()
|
protected char |
getUnicode(int i)
|
void |
includeFont(Font font,
CharTable charTable,
String name)
Embed this font to the file. |
protected abstract void |
openIncludeFont()
Writes the given information about the font into the file. |
protected abstract void |
writeEncoding(CharTable charTable)
Writes the encoding table to the file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final double FONT_SIZE
Constructor Detail |
public FontIncluder(FontRenderContext context)
Method Detail |
protected abstract void openIncludeFont() throws IOException
IOException
protected abstract void writeEncoding(CharTable charTable) throws IOException
IOException
protected void closeIncludeFont() throws IOException
IOException
protected FontRenderContext getContext()
protected String getFontName()
protected Font getFont()
protected CharTable getEncodingTable()
protected Rectangle2D getFontBBox()
protected String getCharName(int i)
protected char getUnicode(int i)
protected char[] getUnicode()
protected int getNODefinedChars()
public void includeFont(Font font, CharTable charTable, String name) throws IOException
font
- The font to includename
- The name under which this font is addressed within the document
(can be retrieved by getFontName())
IOException
protected double getUndefinedWidth()
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |