public class FontGlyphReader
extends java.lang.Object
Font glyphs for strings
into Polygonal geometry.
It is suggested to use larger point sizes to render fonts glyphs,
to reduce the effects of scale-dependent hints.
The resulting geometry are in the base coordinate system
of the font.
The geometry can be further transformed as necessary using
AffineTransformations.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FONT_MONOSPACED |
static java.lang.String |
FONT_SANSERIF |
static java.lang.String |
FONT_SERIF |
| Constructor and Description |
|---|
FontGlyphReader() |
| Modifier and Type | Method and Description |
|---|---|
static Geometry |
read(java.lang.String text,
java.awt.Font font,
double flatness,
GeometryFactory geomFact)
Converts text rendered in the given
Font to a Geometry |
static Geometry |
read(java.lang.String text,
java.awt.Font font,
GeometryFactory geomFact)
Converts text rendered in the given
Font to a Geometry
using a standard flatness factor. |
static Geometry |
read(java.lang.String text,
java.lang.String fontName,
int pointSize,
GeometryFactory geomFact)
Converts text rendered in the given font and pointsize to a
Geometry
using a standard flatness factor. |
public static final java.lang.String FONT_SERIF
public static final java.lang.String FONT_SANSERIF
public static final java.lang.String FONT_MONOSPACED
public static Geometry read(java.lang.String text, java.lang.String fontName, int pointSize, GeometryFactory geomFact)
Geometry
using a standard flatness factor.text - the text to renderfontName - the name of the fontpointSize - the pointSize to render atgeomFact - the geometryFactory to use to create the resultpublic static Geometry read(java.lang.String text, java.awt.Font font, GeometryFactory geomFact)
Font to a Geometry
using a standard flatness factor.text - the text to renderfont - the font to render withgeomFact - the geometryFactory to use to create the resultpublic static Geometry read(java.lang.String text, java.awt.Font font, double flatness, GeometryFactory geomFact)
Font to a Geometrytext - the text to renderfont - the font to render withflatness - the flatness to usegeomFact - the geometryFactory to use to create the result