using width from font:getWidth() results in wrapping with "right" alignment

Issue #558 resolved
Anonymous created an issue

If you test the length of a string using font:getWidth("some text"), and then pass that value to"some text", x, y, returnedwidth, "right"), the text will wrap. However, if you add 1 to returnedwidth, it will draw correctly in the box.


local width = font:getWidth("some text")"some text", 50, 50, width, "right") -- this will wrap!"some text", 50, 50, width + 1, "right") -- this will not wrap!

Comments (1)

  1. Log in to comment