Garry's Mod Wiki

Revision Difference

Structures/FontData#522283

<cat>struct</cat> <structure> <description>Used for <page>surface.CreateFont</page>.</description> <fields> <item name="font" type="string" default="\u0022Arial\u0022">The font source. This must be the actual name of the font, not a file name. <item name="font" type="string" default="Arial">The font source. This must be the actual name of the font, not a file name (<page>Finding the Font Name</page>). Font files are stored in resource/fonts/. This cannot be an existing game font, i.e. "ChatText", "Trebuchet18", etc. (<page>Default Fonts</page>) The length is limited to 31 characters maximum.</item> <item name="extended" type="boolean" default="false">Allow the font to display glyphs that are outside of the Latin-1 range. Unicode code points above 0xFFFF are not supported.</item> <item name="size" type="number" default="13">The font height in pixels `Range:` 4 - 255</item> <item name="weight" type="number" default="500">The font boldness</item> <item name="blursize" type="number" default="0">The strength of the font blurring `Range:` 0 - 80</item> <item name="scanlines" type="number" default="0">The "scanline" interval Must be &gt; 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</item> <item name="antialias" type="boolean" default="true">Smooth the font</item> <item name="underline" type="boolean" default="false">Add an underline to the font</item> <item name="italic" type="boolean" default="false">Make the font italic</item> <item name="strikeout" type="boolean" default="false">Add a strike through</item> <item name="symbol" type="boolean" default="false">Enables the use of symbolic fonts such as Webdings</item> <item name="rotary" type="boolean" default="false">Seems to add a line in the middle of each letter</item> <item name="shadow" type="boolean" default="false">Add shadow casting to the font</item> <item name="additive" type="boolean" default="false">Additive rendering</item> <item name="outline" type="boolean" default="false">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 <page>draw.SimpleTextOutlined</page> when drawing text that you want outlined.</item> </fields> </structure>