> Some connection between gl_draw_cocoa and your OpenGL device project > comes to my mind: OpenGL text writing with textures has been > introduced to allow 64-bit compilation for Mac OS. It could be in fact > applied to all platforms writing first text to a bitmap context. > This would allow arbitrary UTF text and font display in OpenGL. > What do you think ?
If this can be made to work, this might be a Good Thing for the X11/XFT case, as we currently do not have a solid way of rendering XFT fonts into a GL context. (background) With XFT-1, it was possible to get a bitmapped "core" font from an XFT font, so we used that, but with XFT-2 that mechanism was removed, so for XFT-2 (which is pretty much all XFT installations now!) we use some hack code I wrote that tries to find a "core" font by constructing an XLFD name from the XFT font we are using, and loading that as a bitmapped font to use for the GL rendering... Works, but it is nasty, and I don't believe it will handle utf8 strings correctly. (I tried it, it did not work... Works OK for ASCII though...) See around line 448 of fl_font_xft.cxx and line 86 of gl_draw.cxx... Now, with the change Manolo suggests, this might Just Work for X11/XFT and all will be well, and we could simplify away a lot of the cruft associated with GL text in fl_font_xft.cxx. (Note: at the point that I pulled in the utf8 stuff, I tested rendering of utf8 string into a GL window, and it was working on winXP, winVista and OSX, but not on X11/XFT. I can't remember if the X11/Xlib version worked, but I think it did not...) -- Ian SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
