> Kevin Cockrell wrote:
> > gl_font(FL_HELVETICA, 18);
> >
> > But I can't seem to get anything to affect the size of the font.
>
>       Can't say for sure, but I do know if I change the
>       gl_font(1,12) in this program:
>
>       http://seriss.com/people/erco/fltk/#OpenGlTextOn3D
>
>       ..to gl_font(1,24), the font is definitely larger.
>
>       Might have something to do with the placement in your code,
>       or the order of gl calls, hare to say.
>
>       Works for me in fltk-1.1.x on fedora3.

Well, here's another option... The OP didn't say what platform they were using.

If I were to guess it's some sort *nix, and they have compiled fltk with XFT 
support enabled, then that might also be an explanation.

The fltk GL font support, depends on being able to access the X "core" fonts 
for GL windows when using XFT. But with versions of XFT later than version 2, 
the support for mapping "core" fonts was basically removed from XFT...

So... versions of fltk using XFT on platforms with XFT > 2.0, (which is most 
linux boxes these days) end up falling back to a default "safe" font option, as 
they fail to access the font you ask for.

I don't think there's any easy fix for this in the short term either. Versions 
of fltk built *without* XFT, do more or less work, as they can get at the X 
bitmapped fonts, which work OK.

To make the XFT fonts work, we either need to devise some sort of XglUseXftFont 
method (to create GL bitmapped fonts from XFT glyphs) or, in the gl_font code 
somehow bypass the XFT font handling and try to load bitmap fonts directly from 
the X server.

Neither of these options are trivial.

You may be better of setting up your own GL fonts for use in your GL windows, 
perhaps...

--
Ian


_______________________________________________
fltk-opengl mailing list
fltk-opengl@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-opengl

Reply via email to