JTS Topology Suite version 1.13

## com.vividsolutions.jts.awt
Class FontGlyphReader

    java.lang.Object
      com.vividsolutions.jts.awt.FontGlyphReader

    public class FontGlyphReader

extends java.lang.Object

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 resulting geometry are in the base coordinate system of the font. The geometry can be further transformed as necessary using `AffineTransformation`s.

Author:
  Martin Davis

Field Summary
`static java.lang.String` `FONT_MONOSPACED`
`static java.lang.String` `FONT_SANSERIF`
`static java.lang.String` `FONT_SERIF`

Constructor Summary
`FontGlyphReader()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### FONT_SERIF

    public static final java.lang.String FONT_SERIF

See Also:
  Constant Field Values

### FONT_SANSERIF

    public static final java.lang.String FONT_SANSERIF

See Also:
  Constant Field Values

### FONT_MONOSPACED

    public static final java.lang.String FONT_MONOSPACED

See Also:
  Constant Field Values

Constructor Detail

### FontGlyphReader

    public FontGlyphReader()

Method Detail

### read

    public 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.

  Parameters:
    `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
  Returns:
    a polygonal geometry representing the rendered text

### read

    public 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.

  Parameters:
    `text` - the text to render
    `font` - the font to render with
    `geomFact` - the geometryFactory to use to create the result
  Returns:
    a polygonal geometry representing the rendered text

### read

    public 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`

  Parameters:
    `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
  Returns:
    a polygonal geometry representing the rendered text

JTS Topology Suite version 1.13