..:D&G:.. Posted January 22, 2014 Share Posted January 22, 2014 How can I set the a custom font for a dxDrawText? dxDrawText( title, x, 0, x + width, y + 18, tocolor( tcolor[1], tcolor[2], tcolor[3], tcolor[4] * alpha ), 0.6, "bankgothic", "left", "top", true, true, true ) Link to comment
Karuzo Posted January 22, 2014 Share Posted January 22, 2014 Just replace "bankgothic" with your fontname. Dont forget to define it . Link to comment
..:D&G:.. Posted January 22, 2014 Author Share Posted January 22, 2014 Didn't work, but it did when I did this: local font = dxCreateFont("font.ttf") Link to comment
Moderators IIYAMA Posted January 22, 2014 Moderators Share Posted January 22, 2014 local font = dxCreateFont("font.ttf") ----------- dxDrawText( title, x, 0, x + width, y + 18, tocolor( tcolor[1], tcolor[2], tcolor[3], tcolor[4] * alpha ), 0.6, font, "left", "top", true, true, true ) Also make sure, the file is written in the meta.xml Link to comment
ViRuZGamiing Posted January 22, 2014 Share Posted January 22, 2014 indeed "font.ttf"/> -- if i'm correct You can also use a folder: "fonts/font.ttf"/> The folder is also required in the script's line dxCreateFont! Link to comment
..:D&G:.. Posted January 23, 2014 Author Share Posted January 23, 2014 I said it worked, but thx anyway I only posted the last reply if someone might have the same problem and look at this for a solving. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now