> I'd use a single texture per font and use the texture 
> coordinates to control what's visible on the polygon. 
> Whichever is more efficient really depends on the graphics 
> card though.

I think this is what fltk2 does for rendering XFT fonts into a GL
context, if you want to see how that might be done in practice in fltk
code.



On a related note: For rendering GL text under XFT on X11, we need to do
something (very) similar in fltk-1.3, either using Bill's code from
fltk2, or an XFT'ified version of the OpenGL font code that Manolo (I
think) wrote for OSX in fltk-1.3...

At present, fltk-1.3 uses the hack I made up for fltk-1.1 that "finds" a
bitmap core font that "matches" the selected XFT font. This works OK in
a limited sort of way, but will not handle Unicode or etc. gracefully.

If we instead render the XFT glyphs (Bill's method) or entire strings
(Manolo's method) into GL textures, we can then use the XFT fonts
directly in OpenGL, and should be able to handle Unicode strings
(assuming the underlying font that XFT loads actually has the required
glyphs, of course!)

-- 
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 mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to