gm_fontsx
V1 - Windows Binary
由于显然我们永远不会有一种正确的方法来检查Garry的Mod上的已安装字体,因此必须存在吗?
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 (如果您下载了存档,请忽略此事)cd gm_fontsxcargo buildtarget/debug并重命名二进制二进制(gmsv_fontsx_win64.dll,gmcl_fontsx_win64.dlllua/bin目录中注意:即使在其他平台上,模块的扩展也必须为.dll