On 18.12.2009, at 02:29, Greg Ercolano wrote: > Matthias Melcher wrote: >>> a guy sent me a shot of my app running on his system in which the >>> fonts render upside down. any idea what could cause this? >>> shot: http://prodatum.sf.net/tmp/fud.jpg >> >> Thos is a known bug in early ports of FLTK to OS X. > > Hmm, one of my customers just sent me a similar screenshot > of my app with upside-down fonts.. disturbing ;)
Originally, any error in the font loading process would abort and load the default font, bypassing the font flipping matrix call. In the Apple graphics library, Y is up-side-down to the FLTK coordinate system (0,0 is bottom left instead of top left). We use one matrix to flip the coordinate system and have circles, curves and arcs drawn correctly, but that call also flips the font rendering. So when loading a new font, we attach yet again another matrix that flips the font back right-side-up. Early aborts in the font handling process would skip the generation of that matrix. Maybe I overlooked conditions that still would skip matrix generation :-/ The code is in Fl_Font_ IIRC: src/fl_font_mac.cxx: 36, 109, 468 (it got mixed up by recent changes!) Matthias _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

