Jump to content

Setting font for dxDrawTest


..:D&G:..

Recommended Posts

  • Moderators
Posted
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

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

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!

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...