nanogui: Re: FLTK font question


Previous by date: 28 Jul 2011 20:43:15 -0000 Re: nanogui Digest 22 Jul 2011 23:34:15 -0000 Issue 1694, Davide Rizzo
Next by date: 28 Jul 2011 20:43:15 -0000 Re: FLTK font question, Georg Potthast
Previous in thread: 28 Jul 2011 20:43:15 -0000 Re: FLTK font question, Georg Potthast
Next in thread: 28 Jul 2011 20:43:15 -0000 Re: FLTK font question, Georg Potthast

Subject: Re: [nanogui] FLTK font question
From: "Georg Potthast" ####@####.####
Date: 28 Jul 2011 20:43:15 -0000
Message-Id: <003001cc4d66$e55dbb70$6a00a8c0@SCHREIBTISCHGP>

Greg,

I changed my fonts.alias file to this:
!-*-helvetica-medium-r-normal--* -misc-dejavu_sans-medium-r-normal--0-0-0-0-p-0-ascii-0
fixed -misc-dejavu_sans-medium-r-normal--0-0-0-0-p-0-ascii-0
Fixed -misc-dejavu_sans-medium-r-normal--0-0-0-0-p-0-ascii-0

This did also not work as you can see far below. I had already found and
reported in the past that NXlib does not return the same response as Xlib
when called "font_enumfonts - pattern: fixed" which causes FLTK 1.3.0 to
give up. The old FLTK version did not make a call font_enumfonts on fixed
but assumed that to be present. This resulted in the compiled-in font of
nano-x being used, however, one had only a one size font then.

FLTK has a module called fl_font_x.cxx which contains the default fonts for
FLTK:
static Fl_Fontdesc built_in_table[] = {
{"-*-helvetica-medium-r-normal--*"},
{"-*-helvetica-bold-r-normal--*"},
{"-*-helvetica-medium-o-normal--*"},
{"-*-helvetica-bold-o-normal--*"},
{"-*-courier-medium-r-normal--*"},
{"-*-courier-bold-r-normal--*"},
{"-*-courier-medium-o-normal--*"},
{"-*-courier-bold-o-normal--*"},
{"-*-times-medium-r-normal--*"},
{"-*-times-bold-r-normal--*"},
{"-*-times-medium-i-normal--*"},
{"-*-times-bold-i-normal--*"},
{"-*-symbol-*"},
{"-*-lucidatypewriter-medium-r-normal-sans-*"},
{"-*-lucidatypewriter-bold-r-normal-sans-*"},
{"-*-*zapf dingbats-*"}
};
This is why it queries for -*-helvetica-medium-r-normal--* first. I changed
this array to:
static Fl_Fontdesc built_in_table[] = {
{"-*-dejavu sans-medium-r-normal--*"},
{"-*-dejavu sans-bold-r-normal--*"},
{"-*-dejavu sans-medium-o-normal--*"},
{"-*-dejavu sans mono-bold-o-normal--*"},
[.....................]

This resulted in fonts being found and used.

As you wrote it should also work with a fonts.alias file and that would
avoid a change in the FLTK code. That is what I was trying to get to work
now.

Georg

The logfile from NXlib:

xlistfonts called
font_enumfonts called - pattern: -*-helvetica-medium-r-normal--* maxnames:
100
findxlfdfont called
findxlfdfont no _nxfontlist
_getfontlist - return Null
font_enumfonts count: 0
xlistfonts called
font_enumfonts called - pattern: fixed maxnames: 1
findxlfdfont called
findfont_nowild: requested font: fixed height: (1512640)
findfont_nowild: searching in font directory: fonts
findfont_nowild: searching in font directory: /usr/share/fonts/X11/misc
findfont_nowild: searching in font directory: /usr/share/fonts/X11/100dpi
findfont_nowild: searching in font directory:
/usr/share/fonts/truetype/freefont
findfont_nowild: no XLFD
findfont_nowild: searching in font directory:
/usr/share/fonts/truetype/ttf-dejavu
findfont_nowild: no XLFD
findfont_nowild: searching in font directory:
/usr/share/fonts/truetype/openoffice
findfont_nowild: searching in font directory:
/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType
findfont_nowild: no XLFD
findfont_nowild: searching in font directory: /usr/share/fonts/X11/Type1
findfont_nowild: fail
_getfontlist - return Null
font_enumfonts count: 0


Previous by date: 28 Jul 2011 20:43:15 -0000 Re: nanogui Digest 22 Jul 2011 23:34:15 -0000 Issue 1694, Davide Rizzo
Next by date: 28 Jul 2011 20:43:15 -0000 Re: FLTK font question, Georg Potthast
Previous in thread: 28 Jul 2011 20:43:15 -0000 Re: FLTK font question, Georg Potthast
Next in thread: 28 Jul 2011 20:43:15 -0000 Re: FLTK font question, Georg Potthast


Powered by ezmlm-browse 0.20.