JoZeFSvK Posted October 11, 2013 Share Posted October 11, 2013 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
manawydan Posted October 11, 2013 Share Posted October 11, 2013 try change "myFont" to myFont in dx Link to comment
JoZeFSvK Posted October 11, 2013 Author Share Posted October 11, 2013 dxCreateFont -> dxCreatemyFont ? its stupid no ? Link to comment
Driggero Posted October 11, 2013 Share Posted October 11, 2013 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
ixjf Posted October 11, 2013 Share Posted October 11, 2013 Hopefully, you are not calling dxCreateFont at each frame. 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