>> However, there are some problems displaying CJK characters, which >> I've been trying to solve in http://www.fltk.org/str.php?L2158, and >> there are various other UTF-8 related STRs that may or may not be >> closed...
> I think the fix proposed in the STR is correct fro fixed-pitch fonts. Yes, I was tempted to say that we should close this STR because it solves the column based wrapping for fixed width Latin fonts. The new problem that sparkaround has found with CJK fonts is probably best raised as a new STR, but I'm looking at it while he is available for testing. My experience of non-Latin font handling is non-existant. > For proportional fonts, we need to use fl_text_extents(...) or > something to measure how wide the rendered string actually is. > > But... Should we even do that in Fl_Text_Buffer? It is really > intended as a fixed-pitch text editor. It's ability to handle > proportional-pitched fonts is pretty much non-existent, so adding > this ability will be "problematic". I agree that the way forward here is not clear, mainly because the code is not clear. It's hard to know what the original requirements were, which cases are actually handled, and whether there are hooks or seams in the code where this extended functionality can be added. My own feeling is that this will be "whack-a-mole" firefighting with solving each problem raising new issues to be dealt with. One of my colleagues would put this more crudely: this is "turd-polishing". It doesn't matter how much you polish it, it will always be a turd. However, the alternative is for a completely new round of requirements gathering, and for a new set of text display and support classes to be written from the ground up, with UTF-8 designed in from the start. That's an awful lot of work. There are also issues about backward compatibility users whose applications currently use Fl_Text_Buffer, or Fl_Text_Display, or Fl_Text_Editor. Do we open this can of worms? Even if there was one at the bottom of Pandora's can called hope :-) D. _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
