Garry's Mod Wiki

Revision Difference

Structures/FontData#517067

<cat>struct</cat> <structure> <description>Used for <page>surface.CreateFont</page>.</description> <fields> {{StructureField|string|font|The font source. This must be the actual name of the font, not a file name. <item name="font" type="string" default="\u0022Arial\u0022">The font source. This must be the actual name of the font, not a file name. 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.|"Arial"⤶ 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 &amp;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> {{StructureField|boolean|extended|Allow the font to display glyphs that are outside of the Latin-1 range. Unicode code points above 0xFFFF are not supported.|false}}{{StructureField|number|size|The font height in pixels⤶ ⤶ `Range:` 4 - 255|13⤶ }}{{StructureField|number|weight|The font boldness|500}}{{StructureField|number|blursize|The strength of the font blurring⤶ ⤶ `Range:` 0 - 80|0⤶ }}{{StructureField|number|scanlines|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|0⤶ }}{{StructureField|boolean|antialias|Smooth the font|true}}{{StructureField|boolean|underline|Add an underline to the font|false}}{{StructureField|boolean|italic|Make the font italic|false}}{{StructureField|boolean|strikeout|Add a strike through|false}}{{StructureField|boolean|symbol|Enables the use of symbolic fonts such as Webdings|false}}{{StructureField|boolean|rotary|Seems to add a line in the middle of each letter|false}}{{StructureField|boolean|shadow|Add shadow casting to the font|false}}{{StructureField|boolean|additive|Additive rendering|false}}{{StructureField|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 <page>draw.SimpleTextOutlined</page> when drawing text that you want outlined.|false⤶ }}⤶ }}