Jump to content

dxGetTextWidth problem


Master_MTA

Recommended Posts

Posted (edited)

hello their

i have a little problem when i tried to get the width of the arabic text in pixels using dxGetTextWidth function

so i tried to solve it but still doesn't work perfect 

function createString(lenth)
if lenth~=0 then
local st=''
for k=1,lenth do
st=st..'a'
end
return st
else
return 'a'
end
end

dxGetTextWidth (createString(utf8.len( v.text )),1.15,"default-bold")

 

Edited by Master_MTA

Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

Posted (edited)

why do u use utf8.len when u could simply  use string.len ?

i don't see any mistakes but the problem could probably be the language of the text tho

Edited by #STARK

i don't give a heck to what they said about me,  i am what i want to be not what they want me to be

5 years LUA experience

Egypt ~_~

Cairo University / Civil Engineering

Posted
1 hour ago, #STARK said:

language

that what am talking about and for this reason i used utf8.len+_+

 

Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

Posted

up

Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

Posted

solved by my self lol thx all

Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001

every thing is gonna be alright

every thing is gonna be okay

it's gonna be a good good life

that's what my therapist say

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