>>> Rectangular selections pose a real problem. >> Bah! It never worked well anyway... > Can I kicck it out? Can I, can I? Pleeaaase? :-P
Well rectangular selection only makes sense when dealing with a fixed width font where all characters occupy one column, and we have sparkaround's input in STR-2158 that that's not always true. > I'll rip the rectangle selection out first which will greatly > reduce the number of lines of code. I'll refactor the re-occuring > code which should get us 50% there. Then the only real issue left > would be efficient rendering of a line of text which must be > rewritten. There are 3 outstanding problems raised by STR-2158. 1. Incorrect counting of bytes instead of characters for UTF-8 glyphs. That's a one line fix. 2. Incorrect assumption that all [non-control] characters occupy just one column. sparkaround's CJK characters occupy 2 characters. This is fixable by incorporating Markus Kuhn's wcwidth.c code and changing some Fl_Text_* routines to use a char* or ucs parameter instead of just one char at a time. I was working out the best approach and consolidating this in light of... 3. wrap_mode(1, 0) should result in wrapping text at the widget width based on the pixel width of characters, but in fact this only works for ascii, and not higher UTF-8 characters. I was investigating... D. _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
