> > > Please somebody, look at the code in FLTK 2! > >=20 > > It is drawing text using textures in openGL on X. It uses freetype to=20 > > draw the textures and thus it matches the XFT output. > > Good advice from Bill there... > > In the fltk-1.3 gl_draw.cxx there's a #warning (from me) saying that we > need an implementation of glXUseXftFont(...) > > Well, turns out, if I had ever looked, that we already have one - it's > in the fltk2 gl_draw.cxx... > > Similar, and yet different, to what Manolo's code does under OSX. > > So, here's the thing... > > The fltk2 code, on selecting the font, renders the first 256 glyphs from > the font into textures, then "replays" those textures to construct the > strings during gl_draw() calls. > > Manolo's code in fltk-1.3 renders whole strings into textures, then > "replays" that whole string during a redraw... The assumption, I > suppose, being that most strings don't change on every redraw... > > Now; which is best for us? I really have no idea. > > The fltk2 way will make for smaller texture caches, and fewer of them, > but at present can only render glyphs from the (handwave) ISO-8859-1 > range correctly. > > Manolo's way gives bigger textures, and possibly many more of them, but > can probably render any glyph that the current font contains. > > Or there may be some third way, where we go with the fltk2 "per-glyph" > approach, but cache the glyphs the app actually uses... Or...? > > Anybody? > > -- > Ian
The issue is whether we want to draw all of UTF, and it's far too big to be memorized glyph per glyph, or only latin characters, and the single glyph texture approach becomes possible and preferable. I reasoned that FLTK-1.3 aimed at full UTF support. To draw UTF to textures, one needs to be able to draw them to a bitmap in the first place, and that is still not possible in 1.3+X11+xft. So, the way I see this issue is that extending xft support to full UTF needs be solved before deciding how to transform xft output into GL textures. _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
