On Jul 18, 2011, at 4:49 AM, MacArthur, Ian (SELEX GALILEO, UK) wrote: > .... > Unfortunately it seems that nitin, the OP, is on a Linux system... > > I guess the best bet is for him to pre-format the strings into display order > before rendering - this is what ICU or PanGo can help with, of course, but in > this case, if it is just a few simple transpositions, some language-specific > hook might be the easier option. > > I.e. write a little function that scans the passed in string, finds the > specific transposition cases and swaps the chars over, before passing the > "corrected" string to the renderer for display... > > I think that should Just Work, but who knows!
FWIW, I would actually prefer that FLTK handles the conversion to display order (as needed) since otherwise you end up with every Unicode app re-implementing the same damn code, and all of the other (mainstream/popular) GUI toolkits handle this for the developer as well. Since Mac OS X and Windows provide the necessary support already, we would just need to use ICU or Pango on the X11-based platforms to achieve parity. There are some other helpful things that FLTK could provide without a lot of overhead/bloat: 1. A number formatter and scanner that uses the current locale - particularly for Arabic, but also to handle decimal and thousands separators. 2. A method that returns the default display order for the current locale - left to right, right to left, top to bottom, bottom to top. This could be used to reposition 3. Methods to implement localization of strings (perhaps layered on top of the corresponding OS API, or using FLTK-specific code - I can contribute a .po/.strings file loader) ________________________________________ Michael Sweet, Easy Software Products
_______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev