Browsing StarfallEx's section
โ† Back to ACE
Back to StarfallEx

SFEX.render.createFont

C๐Ÿท๏ธ Render

Part of StarfallEx namespace

๐Ÿ”— External
render.createFont(font, size, weight, antialias, additive, shadow, outline, blursize, extended, scanlines)
View on GitHub|lua/starfall/libs_cl/render.lua:1816
๐Ÿ“‹ Has LDoc๐Ÿ‘๏ธ 0 viewsUpdated 2 months ago

Description

Creates a font. Does not require rendering hook Base font can be one of (keep in mind that these may not exist on all clients if they are not shipped with starfall): - Akbar - Coolvetica - Roboto - Roboto Mono - FontAwesome - Courier New - Verdana - Arial - HalfLife2 - hl2mp - csd - Tahoma - Trebuchet - Trebuchet MS - DejaVu Sans Mono - Lucida Console - Times New Roman

Parameters

NameTypeDescription
fontstringBase font to use
size?numberFont size. Default 16
weight?numberFont weight. Default 400
antialias?booleanAntialias font? Default false
additive?booleanIf true, adds brightness to pixels behind it rather than drawing over them. Default false
shadow?booleanEnable drop shadow? Default false
outline?booleanEnable outline? Default false
blursize?numberThe size of the blur Default 0
extended?booleanAllows the font to display glyphs outside of Latin-1 range. Unicode code points above 0xFFFF are not supported. Required to use FontAwesome
scanlines?numberScanline interval. Must be greater than 1 to work. Shares uniqueness with blursize so you cannot create more than one scanline type of font with the same blursize. Default 0

Returns

TypeDescription
stringThe font name that can be used with the rest of the font functions.

Examples

No examples available.

Used In

No usages found in the codebase.