• Custom font not working?
    2 replies, posted
Hi! I am currently having an issue with the hud I am creating. The custom font that I have is not working. I have the font in my actual gmod resources directory but the hud still wont work. I will post the code. Thats in the cl_font [CODE]surface.CreateFont( "Harry_Potter_Font_1", { font = "ParryHotter", extended = false, size = 20, weight = 100, blursize = 0, scanlines = 0, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, })[/CODE] And that is in the sv_font [CODE]resource.AddSingleFile("resource/fonts/ParryHotter.ttf")[/CODE] For an example, for part of my hud, I have this [CODE]draw.DrawText( "Health: "..EchoHealth, "Harry_Potter_Font_1", ScrW() - 1870+2, ScrH() - 112 + 2, Color(255, 255, 255, 255))[/CODE] Am I simply just doing the draw text wrong? Or is it something else?
The [B]font[/B] variable should not be filename, open .ttf file and look at the font name inside
Well that fixed it lol. Thank you!
Sorry, you need to Log In to post a reply to this thread.