Class: fontset

It defines how each character of a string is rendered. You can define what grid the font texture has, and which quad of the grid each character takes.

Methods:

Method overview:


new ([int size=16])
returns: (fontset)
returns a new fontset with default values. Allowed values for size are 6, 8 and 16. Size denotes the number of rows and columns in the fonttexture, which results in the number of glyphs for the font (36, 64 or 256).
delete (fontset)
returns: ()
deletes the fontset.
getdefault ()
returns: (fontset)
returns default fontset, you shouldnt change it as console and other drawings rely on it.
ignorespecials (fontset,[boolean])
returns: ([boolean])
returns or sets if special command characters suchs as \n should be ignored.
linespacing (fontset,[float])
returns: ([float])
returns or sets size of a line, default is 16
lookup (fontset,int character,[int gridfield])
returns: (int)
returns or sets which grid field should be used for this character. gridfield must be between 0 and maxcharacters
maxcharacters (fontset)
returns: (int)
returns how many gridfields exist.
new16x16 ()
returns: (fontset)
returns a new fontset with default values.
new6x6 ()
returns: (fontset)
returns a new fontset with default values.
new8x8 ()
returns: (fontset)
returns a new fontset with default values.
offsetx (fontset,[float])
returns: ([float])
returns or sets glyphoffset from topleft
offsety (fontset,[float])
returns: ([float])
returns or sets glyphoffset from topleft
width (fontset,int character,[float width])
returns: ([int])
returns or sets character width (0-1).