Master_MTA Posted September 9, 2018 Posted September 9, 2018 (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 September 9, 2018 by Master_MTA
#STARK Posted September 9, 2018 Posted September 9, 2018 (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 September 9, 2018 by #STARK
Master_MTA Posted September 9, 2018 Author Posted September 9, 2018 1 hour ago, #STARK said: language that what am talking about and for this reason i used utf8.len+_+
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