S&box Wiki

Revision Difference

Fonts#560962

<cat>UI.Intro</cat> <title>Custom Fonts</title> # Using fonts You can add your own fonts by placing them in the fonts folder within your addon, both otf and ttf files are supported. To use your font you should set the `font-family` on your text so that it matches the font family name of your files. You can use custom fonts in razor by placing `.otf` or `.ttf` files in a folder named `fonts`, make sure this folder is at the root of your project's files. To use your font, set `font-family` in your CSS to the name of your font. ``` font-family: Font Family Name; ``` <note>This differs from normal CSS syntax, this should be a single font name and not multiple.</note> ⤶ # Uploading fonts⤶ ⤶ For your players to download your fonts you need to configure your resource paths to include `fonts/*` in the addon manager like so:⤶ ⤶ <upload src="a5727/8da5e66e76161a6.png" size="5741" name="image.png" />⤶