When doing mPaint.getTextBounds() or AndEngine’s Font.getStringWidth, the trailing space if not taken into account.
When doing mPaint.getTextBounds() or AndEngine’s Font.getStringWidth , the trailing space if not taken into
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It seems to be a feature, not a bug, see the discussion at http://code.google.com/p/android/issues/detail?id=7527 , since the bound is the visual bound.
Workaround: add an extra
xcharacter to the text, measure it, and subtract the width of thex.