Hello Guest

Author Topic: Keeping periods & other punctuation from moving to next line w/o a word?  (Read 5182 times)

sfbaystudios

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 40
    • View Profile
Hello!

The word wrap is an amazing feature, of course.  However from time to time there is a period or another punctuation that happens at the end of a word that happens to be at the end of the line, and the period, without the word, is moved to the next line, so the last line in the block consists of a single period.

Is there a way to keep this from happening?

Thanks!!

OnlineCop

  • Newbie
  • *
  • Posts: 11
    • View Profile
tk2dTextMesh.cs has a switch statement that says "else if (idx == ' ')" among other characters, like periods, semi-colons, and other characters.

Remove all the characters you don't want the "break to next line" code to soft-wrap there (make sure that the space character IS still there).

sfbaystudios

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 40
    • View Profile
Thank you!

spacejaguar

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 27
    • View Profile
Sometimes the space is sent to the next line.

Since obviously we can't remove the space from the switch statment is there another way to avoid this situation?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
No, but good point. I'll fix this for the next release.