• How do I properly have my clients download fonts?
    9 replies, posted
Its been a garry's mod bug for ages it seems. If I upload a font to a workshop addon, and have my clients download it, the font just doesn't work everything else downloads and loads fine. If I use FastDL and upload my font, it still doesn't download correctly, even though everything else downloads and loads fine. [lua] resource.AddFile( "resource/fonts/cutoutsflf2.ttf" ) [/lua] [url]http://gmodgoats.com/fastdl/[/url] -- my fastdl. Anyone else have this issue, or do there fonts download fine, or am i doing something wrong
That did nothing, changed it to .ttf.bz2 and placed the original font file on my server. Yes, I restarted my server. Same exact issue.
beep
You can't add new fonts, your clients must download a sperated addon and install it manualy on the addons folder of GarrysMod. I already ran on the same problem, I'd liked to customize so much my derma frames, but anyway, this seams to be impossible without manual installation, which many players don't know how to do (my players are in majority noob with windows explorer.exe, they don't even know how to copy a file...)...
I don't understand 100% on what you are trying to do with this font you're trying to upload. I'm going to explain it best I can on how I do it and explain why it works to the best of my current knowledge of it and hopefully I'm right I'm just going off personal experience. For instance with my leaderboard addon I first upload the font into my resource section of the addon now in my server file that runs before any thing else server side or client side runs for the addon. I do the resource.Addfile("location/myfont.otf") otf just file type that my font is. Now once doing this the way I implement it is I need to tell stuff I want it to use that font, so I need to create that font with in my code which would need [URL]http://wiki.garrysmod.com/page/surface/CreateFont[/URL] then when I use either the surface or draw library's I can now reference that font and use it. Just adding a resource.addfile that contains a font doesn't just start to change your current used fonts for stuff you need to physically change that yourself. It doesn't just start changing the current used stuff over to this new font that needs to be coded in. I'm pretty sure I'm right with this as my leaderboards does it this way and the new fonts work fine with no problems no matter how there distributed.
keensta, thank you for a response! I would like to say however, I understand that just adding a font is not enough and you have to use surface.CreateFont. That is not the issue in the case. What I am quiet interested is your font is a different file type, and i'm curious if that would make any difference, maybe its one of those source things, i don't know but its worth trying. Thanks again.
Found the issue, anyone else having the issue, I have a solution that may work for you. When you join your server, try to open up the font file that your server actually downloaded for you. If you can't open it, its corrupt, thats why it wouldn't show, it would download but the font wouldn't load because it got corrupt somewhere down the line. Simply redownload the font file from where ever you got it, and upload it back and hopefully next time you download that font file, it won't be corrupt and it will work for you :)
[QUOTE=RayChamp;47438241]Found the issue, anyone else having the issue, I have a solution that may work for you. When you join your server, try to open up the font file that your server actually downloaded for you. If you can't open it, its corrupt, thats why it wouldn't show, it would download but the font wouldn't load because it got corrupt somewhere down the line. Simply redownload the font file from where ever you got it, and upload it back and hopefully next time you download that font file, it won't be corrupt and it will work for you :)[/QUOTE] It also depends on your OS. For Linux and Mac, you have to install the font manually.
I seem to be running into this issue as well.... I added about 10 fonts to my fastdl.lua file, just the same as all the other files, and the clients only download 3 or 4. They're all on the server, so I don't understand what's going on...
Sorry, you need to Log In to post a reply to this thread.