View Issue Details

IDProjectCategoryView StatusLast Update
0009800New issuesScriptingpublic2018-09-30 13:41
ReporterGallardo9944Assigned To 
PrioritynormalSeveritytextReproducibilityalways
Status closedResolutionno change required 
Summary0009800: dxDrawText clip=true doesn't take multispace end of string into consideration if it's aligned to the right
Description

http://gallardo994.cf/screenshots/gta_sa_2018-01-12_19-25-54.png
3rd line should have 16 spaces at the end in total, 2nd line should have 1 space at the end. But all first three lines are exactly identical inside my example. The problem is, clip=true doesn't take spaces into consideration unless there is any symbol after them.

Steps To Reproduce

function render()
local text = "This is an example string"
local px,py = 512,300
dxDrawText(text,0,py-30,px,py,tocolor(255,255,255,255),1,"default-bold","right","center",true)
text = text.." "
py = py + 30
dxDrawText(text,0,py-30,px,py,tocolor(255,255,255,255),1,"default-bold","right","center",true)
for i=1,15 do
text = text.." "
end
py = py + 30
dxDrawText(text,0,py-30,px,py,tocolor(255,255,255,255),1,"default-bold","right","center",true)
text = text.."X"
py = py + 30
dxDrawText(text,0,py-30,px,py,tocolor(255,255,255,255),1,"default-bold","right","center",true)
end
addEventHandler("onClientRender",root,render)

Additional Information

http://gallardo994.cf/screenshots/gta_sa_2018-01-12_19-25-54.png

TagsNo tags attached.

Activities

Gallardo9944

2018-01-12 17:31

viewer   ~~0026393

Additionally, the spaces don't show up if you break the line with \n and write any text.

Issue History

Date Modified Username Field Change