geomerative index |
Name | RFont
Examples |
    None available
Description | RShape is a reduced interface for creating, holding and drawing text from TrueType Font files. It's a basic interpreter of TrueType fonts enabling to access any String in the form of a group of shapes. Enabling us in this way to acces their geometry.
Constructors |
    RFont(fontPath, size, align);
    RFont(fontPath, size);
    RFont(fontPath);
Parameters |
parent |  | PApplet, always use "this" as the value for this parameter.
fontPath |  | String, the name of the TrueType Font file which should be situated in the data folder of the sketch.
size |  | int, the point size of the font in points.
align |  | int, this can only take the following values: RFont.LEFT, RFont.CENTER and RFont.RIGHT.
Fields |
align |  | The alignement of the font. This proprety can take the following values: RFont.LEFT, RFont.CENTER and RFont.RIGHT
forceAscii |  | Should we try to use ASCII, rather than Unicode?
size |  | The point size of the font.
Methods |
draw ( ) |  | Use this method to draw a character on a certain canvas.
setAlign ( ) |  | Use this method to reset the alignement of the font. This proprety can take the following values: RFont.LEFT, RFont.CENTER and RFont.RIGHT
setSize ( ) |  | Use this method to reset the point size of the font.
toGroup ( ) |  | Use this method to get the outlines of a string in the form of an RGroup. All the elements of the group will be RShapes.
toPolygon ( ) |  | Use this method to get the outlines of a character in the form of an RPolygon.
toShape ( ) |  | Use this method to get the outlines of a character in the form of an RShape.
Usage | Geometry
Related | RGroup