Jump to content

Custom font


JoZeFSvK

Recommended Posts

Hey community i have problem with custom font i want load digital font but dont work.

Lets see my folder

digital.ttf

client.lua

meta.xml > and client ..

in client

  
local myFont = dxCreateFont( "digital.TTF") 
dxDrawText(getServerTime()[2],textOffsetX+1,textOffsetY * 1.5+1,screenWidth,screenHeight,tocolor(0,0,0,alpha*1.7),1.7*(screenWidth*0.50)/1080,"myFont","left","top",true,true,true) 
    dxDrawText(getServerTime()[2],textOffsetX,textOffsetY * 1.5,screenWidth,screenHeight,tocolor(255,255,255,alpha*1.7),1.7*(screenWidth*0.50)/1080,"myFont","left","top",true,true,true) 
  

and more ... i see font in game but it isnt my digital font. thank you

Link to comment

remove the quotation marks around myFont in the dxDrawText function.

local myFont = dxCreateFont( "digital.TTF") 
dxDrawText(getServerTime()[2],textOffsetX+1,textOffsetY * 1.5+1,screenWidth,screenHeight,tocolor(0,0,0,alpha*1.7),1.7*(screenWidth*0.50)/1080,myFont,"left","top",true,true,true) 
    dxDrawText(getServerTime()[2],textOffsetX,textOffsetY * 1.5,screenWidth,screenHeight,tocolor(255,255,255,alpha*1.7),1.7*(screenWidth*0.50)/1080,myFont,"left","top",true,true,true) 

Link to comment

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...