Package org.apache.fop.svg
Class PDFTextUtil
java.lang.Object
org.apache.fop.pdf.PDFTextUtil
org.apache.fop.svg.PDFTextUtil
Utility class for generating PDF text objects. It needs to be subclassed to add writing
functionality (see
PDFTextUtil.write(String)
).-
Field Summary
Fields inherited from class org.apache.fop.pdf.PDFTextUtil
TR_CLIP, TR_FILL, TR_FILL_CLIP, TR_FILL_STROKE, TR_FILL_STROKE_CLIP, TR_INVISIBLE, TR_STROKE, TR_STROKE_CLIP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the current encoding.Returns the current font in use.protected void
Resets the state fields.protected boolean
protected boolean
isMultiByteFont
(String name) Determines whether the font with the given name is a multi-byte font.void
setCurrentEncoding
(int encoding) Sets the current encoding.void
Sets the current font.void
Writes a "Tf" command, setting a new current font.Methods inherited from class org.apache.fop.pdf.PDFTextUtil
adjustGlyphTJ, beginTextObject, concatMatrix, endTextObject, isInTextObject, setTextRenderingMode, setTextRenderingMode, updateTf, write, write, writeTd, writeTextMatrix, writeTf, writeTj, writeTJ, writeTJMappedChar, writeTJMappedCodePoint
-
Constructor Details
-
PDFTextUtil
Main constructor.- Parameters:
fontInfo
- the font catalog
-
-
Method Details
-
initValues
protected void initValues()Resets the state fields.- Overrides:
initValues
in classPDFTextUtil
-
getCurrentFont
Returns the current font in use.- Returns:
- the current font or null if no font is currently active.
-
getCurrentEncoding
public int getCurrentEncoding()Returns the current encoding.- Returns:
- the current encoding
-
setCurrentFont
Sets the current font.- Parameters:
f
- the new font to use
-
setCurrentEncoding
public void setCurrentEncoding(int encoding) Sets the current encoding.- Parameters:
encoding
- the new encoding
-
isMultiByteFont
Determines whether the font with the given name is a multi-byte font.- Parameters:
name
- the name of the font- Returns:
- true if it's a multi-byte font
-
isCIDFont
-
writeTf
Writes a "Tf" command, setting a new current font.- Parameters:
f
- the font to select
-