Package org.apache.fop.render.ps
Class NativeTextHandler
java.lang.Object
org.apache.fop.render.ps.NativeTextHandler
- All Implemented Interfaces:
org.apache.xmlgraphics.java2d.ps.PSTextHandler
,org.apache.xmlgraphics.java2d.TextHandler
public class NativeTextHandler
extends Object
implements org.apache.xmlgraphics.java2d.ps.PSTextHandler
Specialized TextHandler implementation that the PSGraphics2D class delegates to to paint text
using PostScript text operations.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionNativeTextHandler
(org.apache.xmlgraphics.java2d.ps.PSGraphics2D g2d, FontInfo fontInfo) Main constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
drawString
(Graphics2D g, String s, float x, float y) Draw a string to the PostScript document.Return the font information associated with this objectvoid
setOverrideFont
(Font override) Sets the overriding font.void
void
-
Field Details
-
fontInfo
FontInfo containing all available fonts -
font
Currently valid Font -
overrideFont
Overriding FontState -
currentFontName
the current (internal) font name -
currentFontSize
protected int currentFontSizethe current font size in millipoints
-
-
Constructor Details
-
NativeTextHandler
Main constructor.- Parameters:
g2d
- the PSGraphics2D instance this instances is used byfontInfo
- the FontInfo object with all available fonts
-
-
Method Details
-
getFontInfo
Return the font information associated with this object- Returns:
- the FontInfo object
-
writeSetup
- Specified by:
writeSetup
in interfaceorg.apache.xmlgraphics.java2d.ps.PSTextHandler
- Throws:
IOException
-
writePageSetup
- Specified by:
writePageSetup
in interfaceorg.apache.xmlgraphics.java2d.ps.PSTextHandler
- Throws:
IOException
-
drawString
Draw a string to the PostScript document. The text is painted using text operations.- Specified by:
drawString
in interfaceorg.apache.xmlgraphics.java2d.TextHandler
- Throws:
IOException
-
setOverrideFont
Sets the overriding font.- Parameters:
override
- Overriding Font to set
-