Class FontGlyphReader

Hierarchy: Object , FontGlyphReader
public class FontGlyphReader
Provides methods to read 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 AffineTransformations.

Authors:
Martin Davis
public 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.
Parameters:
text - text the text to render
fontName - fontName the name of the font
pointSize - pointSize the pointSize to render at
geomFact - geomFact the geometryFactory to use to create the result
Returns:
a polygonal geometry representing the rendered text
public static Geometry read(String text, Font font, GeometryFactory geomFact)
Converts text rendered in the given Font to a Geometry using a standard flatness factor.
Parameters:
text - text the text to render
font - font the font to render with
geomFact - geomFact the geometryFactory to use to create the result
Returns:
a polygonal geometry representing the rendered text
public static Geometry read(String text, Font font, double flatness, GeometryFactory geomFact)
Converts text rendered in the given Font to a Geometry
Parameters:
text - text the text to render
font - font the font to render with
flatness - flatness the flatness factor to use
geomFact - geomFact the geometryFactory to use to create the result
Returns:
a polygonal geometry representing the rendered text