public class LayoutProcessor extends Object
| Modifier and Type | Method and Description |
|---|---|
static GlyphVector |
computeGlyphVector(BaseFont baseFont,
float fontSize,
String text)
Computes glyph positioning
|
static void |
disable() |
static void |
enable()
Enables the processor.
|
static void |
enable(int flags)
Enables the processor with the provided flags.
|
static void |
enableKernLiga()
Enables the processor.
|
static void |
enableKernLiga(int flags)
Enables the processor with the provided flags.
|
static int |
getFlags() |
static boolean |
isEnabled() |
static boolean |
isSet(int queryFlags) |
static void |
loadFont(BaseFont baseFont,
String filename)
Loads the AWT font needed for layout
|
static void |
setKerning()
Set kerning
|
static void |
setKerning(Font font)
Set kerning for one font
|
static void |
setLigatures()
Add ligatures
|
static void |
setLigatures(Font font)
Set ligatures for one font
|
static void |
setRunDirectionLtr(Font font)
Set run direction for one font to LTR
|
static void |
setRunDirectionRtl(Font font)
Set run direction for one font to RTL
|
static Point2D |
showText(PdfContentByte cb,
BaseFont baseFont,
float fontSize,
String text)
Shows a text using glyph positioning (if needed)
|
static boolean |
supportsFont(BaseFont baseFont) |
public static void enable()
Kerning and ligatures are switched off. This method can only be called once.
public static void enable(int flags)
Kerning and ligatures are switched off. This method can only be called once.
flags - see java.awt.Font.layoutGlyphVectorpublic static void enableKernLiga()
Kerning and ligatures are switched on. This method can only be called once.
public static void enableKernLiga(int flags)
Kerning and ligatures are switched on. This method can only be called once.
flags - see java.awt.Font.layoutGlyphVectorpublic static boolean isEnabled()
public static void setKerning()
public static void setKerning(Font font)
font - The font for which kerning is to be turned onpublic static void setLigatures()
public static void setLigatures(Font font)
font - The font for which ligatures are to be turned onpublic static void setRunDirectionRtl(Font font)
font - The font for which the run direction is setpublic static void setRunDirectionLtr(Font font)
font - The font for which the run direction is setpublic static int getFlags()
public static boolean isSet(int queryFlags)
public static boolean supportsFont(BaseFont baseFont)
public static void loadFont(BaseFont baseFont, String filename)
baseFont - OpenPdf base fontfilename - of the font fileRuntimeException - if font can not be loadedpublic static GlyphVector computeGlyphVector(BaseFont baseFont, float fontSize, String text)
baseFont - OpenPdf base fonttext - input textpublic static Point2D showText(PdfContentByte cb, BaseFont baseFont, float fontSize, String text)
cb - object containing the content of the pagebaseFont - base font to usefontSize - font size to applytext - text to showpublic static void disable()
Copyright © 2024. All rights reserved.