I'm having a bit of trouble right now trying to implement word wrapping for non-monospaced fonts (The font can be different). I've tried searching for this everywhere but couldn't find a solution. Any tips?
Asked
Active
Viewed 123 times
0
-
1please be more specific, what language / method are you using? – yoda Dec 22 '10 at 10:54
1 Answers
1
How about this?
- store length in pixels of every word
- store pixel-offset of every word
- when text gets inserted in a line, update the offsets and, if necessary, break the line

thejh
- 44,854
- 16
- 96
- 107