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 result geometry is in the base coordinate system of the font.
The geometry can be further transformed as necessary using
AffineTransformation
s.
Modifier and Type | Field and Description |
---|---|
static String |
FONT_MONOSPACED
The font name of the Java logical font Monospaced.
|
static String |
FONT_SANSERIF
The font name of the Java logical font SansSerif.
|
static String |
FONT_SANSSERIF
The font name of the Java logical font SansSerif.
|
static String |
FONT_SERIF
The font name of the Java logical font Serif.
|
Modifier and Type | Method and Description |
---|---|
static Geometry |
read(String text,
Font font,
double flatness,
GeometryFactory geomFact)
|
static Geometry |
read(String text,
Font font,
GeometryFactory geomFact)
|
static Geometry |
read(String text,
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 String FONT_SERIF
public static final String FONT_SANSERIF
DEPRECATED - use FONT_SANSSERIF
public static final String FONT_SANSSERIF
public static final String FONT_MONOSPACED
public static Geometry read(String text, 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(String text, Font font, GeometryFactory geomFact)
text
- the text to renderfont
- the font to render withgeomFact
- the geometryFactory to use to create the resultpublic static Geometry read(String text, Font font, double flatness, GeometryFactory geomFact)
text
- the text to renderfont
- the font to render withflatness
- the flatness factor to usegeomFact
- the geometryFactory to use to create the resultCopyright © 2022. All rights reserved.