Author Topic: No linebreaks on Zero Width characters - Possible fix  (Read 1500 times)

atrainedmonkey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
No linebreaks on Zero Width characters - Possible fix
« on: August 28, 2015, 10:37:51 AM »
Hi,

We've been having issues with Thai languages in our game, as localisation comes back with whole sentences with no breaks.

We need line breaks to be calculated dynamically, so we can't manually inject spaces.

Instead we have the localisation team indicate where the lines can be broken with a token character, and then we substitute this with the Zero Width Space character:
 http://www.fileformat.info/info/unicode/char/200B/index.htm

I thought this might be a bug, and not by design as the function NGUIText.IsSpace() recognises this character.

So I've added a patch file with our changes in-case this is a valid fix that could be applied to NGUI eventually.




ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: No linebreaks on Zero Width characters - Possible fix
« Reply #1 on: August 30, 2015, 12:14:14 PM »
Thanks, I'll add your change.