Package org.apache.fop.render.java2d
Class Java2DUtil
- java.lang.Object
-
- org.apache.fop.render.java2d.Java2DUtil
-
public final class Java2DUtil extends java.lang.Object
Rendering-related utilities for Java2D.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FontInfo
buildDefaultJava2DBasedFontInfo(FontInfo fontInfo, FOUserAgent userAgent)
Builds a defaultFontInfo
object for use with output formats using the Java2D font setup.static java.awt.font.GlyphVector
createGlyphVector(java.lang.String text, java.awt.Graphics2D g2d, Font font, FontInfo fontInfo)
Creates an instance ofGlyphVector
that correctly handle surrogate pairs and advanced font features such as GSUB/GPOS/GDEF.
-
-
-
Method Detail
-
buildDefaultJava2DBasedFontInfo
public static FontInfo buildDefaultJava2DBasedFontInfo(FontInfo fontInfo, FOUserAgent userAgent)
Builds a defaultFontInfo
object for use with output formats using the Java2D font setup.- Parameters:
fontInfo
- the font info object to populateuserAgent
- the user agent- Returns:
- the populated font information object
-
createGlyphVector
public static java.awt.font.GlyphVector createGlyphVector(java.lang.String text, java.awt.Graphics2D g2d, Font font, FontInfo fontInfo)
Creates an instance ofGlyphVector
that correctly handle surrogate pairs and advanced font features such as GSUB/GPOS/GDEF.- Parameters:
text
- Text to renderg2d
- the target Graphics2D instancefont
- the font instancefontInfo
- the font information- Returns:
- an instance of
GlyphVector
-
-