So I have problems with custom font.
Every time I join the server is the wrong font and to make it work I have to edit something in the file and save it. Because that's not an option I think someone could help me.
[b]First time Join[/b]
[img]http://i.imgur.com/lMwSCzL.jpg[/img]
[b]How it should look[/b]
[img]http://i.imgur.com/VibrK7u.jpg[/img]
[b]This is the code for the custom font and it's located outside the function[/b]
[lua]
surface.CreateFont( "Text", {
font = "SquareFont",
size = 25,
weight = 500,
shadow = true
} )
[/lua]
I have the font in resource/fonts/ The font name in the folder is Square.ttf
I am not sure if I need to use surface.SetFont in case I am using custom fonts but because I am using multiple Labels but idk If I have to use it only once for that font or I have to paste it above each label.
What you see above it's the code for font and when I use it I use "Text" maybe I forgot to add something.
Try to set the font in surface.CreateFont to the fonts file name, I had this same issue with the ExoBlack font until i set font to ExoBlack.ttf and then it worked fine.
It didn't worked for me.
[editline]6th August 2013[/editline]
And if I use there the file name it's not even the font that is suppose to be.
This is how is looking, that's why I think I have to use the name that I see in a text editor.
[img]http://i.imgur.com/VIYXWwO.jpg[/img]
[editline]6th August 2013[/editline]
The button was located in another file and the font was also created in that file but once I used the font from the main file I didn't had the problem anymore.
Sorry, you need to Log In to post a reply to this thread.