Hello, GMod Lua Community!
I have a question with which i’m trying to deal about half of year.
The sutiation.
I’m used to use special fonts for my work in coding.
So i have a few fonts - digital7mono and Helvetica Family. Format - ttf
The Goal
To make every client have these fonts on joining.
The Problem
Fonts couldn’t be loaded automatically.
My Ways
-
If client will download (addon with fonts) by himself, the fonts will be loaded. (Let’s have a case without downloading manually)
-
If i use
game.MountGMA it will throw an error:
Failed to load custom font file 'c:/program files (x86)/steam/steamapps/common/garrysmod/garrysmod/workshop/resource/fonts/digital7mono.ttf'
(Also error happends with other fonts, which exists in same folder)
- If i use
resource.AddFile nothing will be downloaded. (BUT if i add fonts in folder garrysmod/fonts it will download them, but font’s will not activate.)
3.1 The same with
Info
By made addon:
fonts are in folder /resource/fonts/*
Trying by mounting on client:
steamworks.FileInfo( 949191667, function( result )
steamworks.Download( result.fileid, true, function( name )
game.MountGMA( name )
end)
end)
Installing on server in garrysmod/resource/fonts by
resource.AddSingleFile("resource/fonts/digital7mono.ttf")
or
resource.AddFile("resource/fonts/digital7mono.ttf")
– failed
Installing on server in garrysmod/fonts by
resource.AddSingleFile("fonts/digital7mono.ttf")
or
resource.AddFile("fonts/digital7mono.ttf")
– download but not activated
I’ve tried to search topics about fonts but no solution found.
This is my question. Thanks.