Ian,
I appreciate your response; it explained several things; however, I now believe I have a basic font problem with my platform which is Ubuntu-Linux. I believe the image I'm using is stripped down a bit.
I tired myButton.labelfont(FL_TIMES) with the standard FLTK fonts and noticed that the font displayed doesn't change regardless of which font I pick. FL_HELVETICA, FL_COURIER, FL_TIMES, FL_SYMBOL, FL_SCREEN, FL_ZAPF_DINGBATS all display just as in the image I posted earlier. This is true for the 'window title' as well as the button. This is why I believe I have a basic problem with fonts.
Of course fonts work fine with other applications; especially my browser. I'm guessing FLTK (which uses X11) gets its fonts from a different mechanism than the browser. Is this a case where the fonts FLTK uses aren't installed? The file /etc/fonts/fonts.conf includes the following:
<dir>/usr/share/fonts</dir>
<dir>/usr/X11R6/lib/X11/fonts</dir> <dir>/usr/local/share/fonts</dir>
<dir>~/.fonts</dir>
Also, your response implied I could but a string in myButton.labelfont("NameOfAFontYouLike") but that doesn't compile for me. Can I use other fonts besides the standard FLTK fonts?
'fonts' generates the image below. Note that the the 1st sixteen fonts generate the same output; these are the same fonts that generated the same output in my program. The font 'bitstream charter' and below appear to work. I don't see the old standbys like Aria, Helvetian etc.
'utf8' generates the image below. These fonts seem to work but its a sparse list. The 'Select' button produces strange names on the console. 'Select' 'fixed' produces:
idx 29User name :fixed:FLTK name :-*-fixed-medium-r-normal--*:size 16
Never the less '-*-fixed-medium-r-normal--*' works if I use Albrecht's suggestion.
I don't know the answer to this. How can a figure this out?
Maybe this is my problem. I just enter 'make' so I'm sure I have the default. How do I build it the other way?
This doesn't compile for me. 'lablefont()' wants an integer argument. I wonder if you have an enhancement that allows a string argument.
Following 'Albrecht's' susuggestion the following works for me.
Fl::set_font(FL_TIMES, "-*-fixed-medium-r-normal--*"); but.labelfont(FL_TIMES);
./configure -enable-xft
make
sudo make install
./configure -enable-x11
make
sudo make install
On 05/01/15 12:46, Jack Huffman wrote:
> I just rebuilt/installed once with '-enable-xft' and another time with '-enable-x11' and I didn't see any difference in ../test/fonts or ../test/utf8. The build sequence I used is below:
> |
> ./configure -enable-xft
Note: according to the --help output for configure, the flags is "--enable-xft"
(and not "-enable-xft"), though it's possible it understands both.
Check if 'configure' gave the following 'yes' answers for the Xft related tests:
:
checking X11/Xft/Xft.h usability... yes
checking X11/Xft/Xft.h presence... yes
checking for X11/Xft/Xft.h... yes
checking for XftDrawCreate in -lXft... yes
I don't get any of these console outputs from 'configure' with either one or two dashes. I do get the same console output with one or two dashes. I sent the std-output to files and compared the results; they were the same with one or two dashes. If I grep the 'configure' std-output for 'xft' I get the following: Note there is a warning I didn't notice before; I think its going to stderr.
username@NextGen:~/Downloads/fltk-1.3.3$ ./configure --enable-xft | grep -i xftconfigure: WARNING: Ignoring libraries " -lSM -lICE" requested by configure. Graphics: X11+Xft+Xdbe+Xineramausername@NextGen:~/Downloads/fltk-1.3.3$