processing/processing — pull request #2318 by hoshi-sano (2014-01-16 12:38:06+00:00)
Title: fix #2173 Multi byte character overlapping

Hi.
I examined about #2173, and I think this lines causes the problem.

* https://github.com/processing/processing/blob/master/app/src/processing/app/syntax/TextAreaPainter.java#L669-L672
* https://github.com/processing/processing/blob/master/app/src/processing/app/syntax/TextAreaPainter.java#L764-L767

Here, only ascii space's width is used to calculate the character's x-coordinate.
but the width of Japanese/Chinese character is about twice the ascii character.

e9caccb: This change is the cause of the problem.

---

I hope my patch makes the code better.

But I do not know the background well,
therefore I cannot determine whether this modification is appropriate.

If you don't want to use changeable (proportional font's) width, the solution I can think of is:

1. check whether each of the character is multi byte (or single byte).
2. if the character is single byte, use width of ' ' (ascii space, a.k.a single byte space).
3. if the character is multi byte, use width of '　' (multi byte space).

(But in a troublesome thing, Japanese includes multi byte character that has width as same as ascii characters.)