gm_fontsx
V1 - Windows Binary
Since apparently we're never getting a proper way to check for installed fonts on Garry's Mod, this has to exist ?
require("fontsx")
-- creates a gmod virtual font depending on whether the system font "Consolas" is available
surface.CreateFont("my_virtual_font", {
font = fonts.Exists("Consolas") and "Consolas" or "Roboto",
size = 15,
})require("fontsx")
-- prints all system fonts currently available
PrintTable(fonts.GetAll())git clone https://github.com/Earu/gm_fontsx (ignore this if you've downloaded the archive)cd gm_fontsxcargo buildtarget/debug and rename the binary according to your branch and realm (gmsv_fontsx_win64.dll, gmcl_fontsx_win64.dll, gmsv_fontsx_linux.dll, gmcl_fontsx_linux.dll, gmcl_fontsx_osx64.dll)lua/bin directoryNote: Even on other platforms than Windows the extension of your modules needs to be .dll