nanogui: FLTK keyboard question


Previous by date: 27 Jun 2011 17:18:22 -0000 Re: FLTK keyboard question, Greg Haerr
Next by date: 27 Jun 2011 17:18:22 -0000 Re: FLTK keyboard question, Georg Potthast
Previous in thread: 27 Jun 2011 17:18:22 -0000 Re: FLTK keyboard question, Greg Haerr
Next in thread: 27 Jun 2011 17:18:22 -0000 Re: FLTK keyboard question, Georg Potthast

Subject: Re: [nanogui] FLTK keyboard question
From: "Greg Haerr" ####@####.####
Date: 27 Jun 2011 17:18:22 -0000
Message-Id: <8AD6DC9FC3FB4C9AAB81A4B2BF86BBA6@winXP>

> I downloaded that and got it to run. However, there is no text displayed 
> in the demos.

No text at all, or small text.  Do previous versions of FLTK work
properly?


> findfont_nowild: fail

You need to look up the XLFD font spec that's being sent
to "X11" for processing.  This should be in the XLoadFont
code.



> With the old versions the system font was used. The code is:
Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!");
box->box(FL_UP_BOX);
box->labelfont(FL_BOLD+FL_ITALIC);
box->labelsize(36);
box->labeltype(FL_SHADOW_LABEL);
window->end();

That resulted in the following messages:

findfont_nowild: fail
findfont: FINI nowild fixed = (null) height 32
findfont: START 6x13 0,0
findfont_nowild: fail
findfont: FINI nowild 6x13 = (null) height 32
XLoadFont('fixed') = '(null)' height 32 [0]
> So I did not get a 36 font but the fixed font. Do you have any suggestions 
> how to get a font to work?

This is likely that a fonts.alias or other file required to translate
the fonts specified in FLTK 1.3 and sent to NXLIB can
be found in NXLIB's font directories.  This is complicated,
but you will need fonts.dir, fonts.alias, and possibly other
files that will allow truetype fonts to be selected, so that the
large size can be created.  A workaround would be to build
an alias for a fixed-size 36 font, which would be found with
the variable sized XLFD font spec.

Regards,

Greg


Previous by date: 27 Jun 2011 17:18:22 -0000 Re: FLTK keyboard question, Greg Haerr
Next by date: 27 Jun 2011 17:18:22 -0000 Re: FLTK keyboard question, Georg Potthast
Previous in thread: 27 Jun 2011 17:18:22 -0000 Re: FLTK keyboard question, Greg Haerr
Next in thread: 27 Jun 2011 17:18:22 -0000 Re: FLTK keyboard question, Georg Potthast


Powered by ezmlm-browse 0.20.