On 01/05/16 13:40, Abdelkader Belahcene wrote:
> I wrote the same Hello.cxx programme as in doc, The word Hello World is
> dispIayed in the standard size , and not in the size I used (36), same problem with the face,.
>
> I mean the commands :
>
> box->labelsize(36);
> box->labelfont(FL_BOLD+FL_ITALIC);
BTW, normally one would include a font name in there, e.g.
box->labelfont(FL_HELVETICA+FL_BOLD+FL_ITALIC); // helvetica bold italic
..or:
box->labelfont(FL_COURIER+FL_BOLD+FL_ITALIC); // courier bold italic
I believe if the font is unspecified, it uses FL_HELVETICA
(which ends up being 0), so what you have should be OK.
But for testing purposes, see if making it FL_COURIER
lets the size change, which might indicate the font FLTK is
using for FL_HELVETICA is for some reason unavailable, or
is available, but not in multiple sizes.
> don't changing anything for the text
> ..
> Here is the [screenshot] displayed by the hello in the official test directory
I'm guessing from the title bar of your screenshot
that the operating system is linux, and therefore X11.
The text in the screenshot you included looks suspiciously
like an *un*-antialised font, is this intentional?
Normally under linux, FLTK wants to use XFT, which gives better results
for font rendering and more flexibility with font size changes.
First, if you're building FLTK 1.3.3 from scratch (downloaded as a
source tarball), be sure when you run './configure' that it is detecting
XFT.
Also, make sure you're not getting interference from a previously installed
version of FLTK: check to see if /usr/include/FL exists, and if it does,
rename it away so that your new 1.3.3 doesn't accidentally use that previous
install's #include files when building the lib or the apps.
Then rebuild FLTK 1.3.3 (make clean; make) and rebuild your app.
If you're purposefully not using XFT, then make sure the base fonts
FLTK needs are there. If they're not available, FLTK is probably falling
back to some generic font whose size is fixed.
Some other folks here might have other ideas too..