Garry's Mod Wiki

FontData

Description

Members

string font
The font source. Custom font files are stored in resource/fonts/.

The length is limited to 31 characters maximum.

This must be the actual 'nice' font, not a file name. (Finding the Font Name)

This also cannot be an already registered font, i.e. you cannot base your font from any of the Default Fonts

Default: "Arial"

boolean extended
Allow the font to display glyphs that are outside of the Latin-1 range. Unicode code points above 0xFFFF are not supported.

Default: false

number size
The font height in pixels

Range: 4 - 255

Default: 13

number weight
The font boldness

Default: 500

number blursize
The strength of the font blurring

Range: 0 - 80

Default: 0

number scanlines
The "scanline" interval Must be > 1 to work. This setting is per blursize per font - so if you create a font using "Arial" without scanlines, you cannot create an Arial font using scanlines with the same blursize

Default: 0

boolean antialias
Smooth the font

Default: true

boolean underline
Add an underline to the font

Default: false

boolean italic
Make the font italic

Default: false

boolean strikeout
Add a strike through

Default: false

boolean symbol
Enables the use of symbolic fonts such as Webdings

Default: false

boolean rotary
Seems to add a line in the middle of each letter

Default: false

boolean shadow
Add shadow casting to the font

Default: false

boolean additive
Additive rendering

Default: false

boolean outline
Add a black outline to the font.

This does not work well with antialias, and only allows black 1-pixel outlines. It may be preferable to not use this parameter, and instead use draw.SimpleTextOutlined when drawing text that you want outlined.

Default: false