public class FontGlyphReader extends 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 String |
FONT_MONOSPACED
|
static String |
FONT_SANSERIF
|
static String |
FONT_SERIF
|
| Constructor and Description |
|---|
FontGlyphReader()
|
| Modifier and Type | Method and Description |
|---|---|
static Geometry |
read(String
|
static Geometry |
read(String
|
static Geometry |
read(String
Converts text rendered in the given font and pointsize to a
Geometry using a standard flatness factor.
|
public static final StringFONT_SERIF
public static final StringFONT_SANSERIF
public static final StringFONT_MONOSPACED
public static Geometryread(String text, String fontName, int pointSize, GeometryFactory geomFact)
Geometry using a standard flatness factor.
text - the text to render
fontName - the name of the font
pointSize - the pointSize to render at
geomFact - the geometryFactory to use to create the result
public static Geometryread(String text, Font font, GeometryFactory geomFact)
text - the text to render
font - the font to render with
geomFact - the geometryFactory to use to create the result
public static Geometryread(String text, Font font, double flatness, GeometryFactory geomFact)
text - the text to render
font - the font to render with
flatness - the flatness to use
geomFact - the geometryFactory to use to create the result