DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2525 Version: 1.3-current I see the problem. fl_font_mac.cxx implements several versions of fl_width(): double fl_width(const UniChar* txt,int n) -- does real work double fl_width(const char* txt,int n) -- calls mac_Utf8_to_Utf816() then calls above double fl_width(uchar c) -- calls const char*,int double fl_width(unsigned int wc) -- calls UniChar*,int It seems when fl_width('X') is called, the compiler is choosing 'fl_width(unsigned int)' over 'fl_width(uchar)'. This skips the utf8->utf816 conversion, causing the weird return values. At first I thought this was some bizarre upcasting rule, but as it turns out, FL/fl_draw.H doesn't *have* a prototype for fl_width(uchar), so the 'unsigned int' one is being used instead. So either we need to add 'double fl_width(uchar)' to FL/fl_draw(), or we need to remove fl_width(uchar) from fl_font_mac.cxx, and re-think the implementation of fl_width(unsigned int) so that it calls the utf8->utf16 routines. *Not* assigning this to myself, as I don't know the answer. Link: http://www.fltk.org/str.php?L2525 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
