nanogui: FLNX 0.12 - fonts problems


Previous by date: 20 Oct 2000 03:29:57 -0000 Anybody can help me?, linuxhh
Next by date: 20 Oct 2000 03:29:57 -0000 Re: nano-x porting SA1100, Greg's email
Previous in thread:
Next in thread: 20 Oct 2000 03:29:57 -0000 Re: FLNX 0.12 - fonts problems, Jeff Moellmer

Subject: FLNX 0.12 - fonts problems
From: ####@####.####
Date: 20 Oct 2000 03:29:57 -0000
Message-Id: <4825697E.001298C1.00@HKGWEB01.VTECH.COM.HK>

Hi Jeff,

How to configure flnx to support different fonts, like generic, T1, TTF,
HZKFONT, etc?

I'd like to use fltk running on nano-x on Assabet board. Now, I successfully
port Microwindows 0.89pre3 on my platform.
I can display different font type/size including T1LIB, Free Type, HZKFONT
Chinese characters, etc. under Microwinodws.

However, I cannot change the font type or font size on my application written by
flnx and even cannot run the demo program - fonts under subdirectory flnx/test/
.

The demo program - fonts cannot work even I try several combination.

(1) I copy all *.ttf file to /usr/X11R6/lib/X11/fonts/webfonts/  and run
I got the following error (but I am sure the files are existed in the correct
directory)

hifi:~/microwindows/flnx/test # /fonts

t1lib_createfont: /usr/X11R6/lib/X11/fonts/webfonts/arial.ttf,16 not found
t1lib_createfont: /usr/X11R6/lib/X11/fonts/webfonts/timesb.ttf,16 not found


(2) use generic fonts
I definitely use the second part of font table by using XX_NANO_X macro to
unselect the first part  in file fl_font.cxx (as shown below)

////////////////////////////////////////////////////////////////
#ifdef XX_NANO_X
// WARNING: if you add to this table, you must redefine FL_FREE_FONT
// in Enumerations.H & recompile!!
static Fl_Fontdesc built_in_table[] = {
{"/usr/X11R6/lib/X11/fonts/webfonts/arial.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/arialb.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/ariali.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/arialz.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/cour.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/courb.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/couri.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/courz.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/times.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/timesb.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/timesi.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/timesz.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
{"/usr/X11R6/lib/X11/fonts/webfonts/impact.ttf"},
/*{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"},
{"HZKFONT"}
*/
};

#else
// WARNING: if you add to this table, you must redefine FL_FREE_FONT
// in Enumerations.H & recompile!!
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-*"}
};
#endif


Unluckily, I got the following error.

hifi:~/microwindows/flnx/test # ./fonts
t1lib_createfont:
-*-helvetica-medium-r-normal--*,16 not foundt1lib_createfont:
-*-times-bold-r-normal--*,16 not found

Actually, I have no files something like  -*-helvetica-medium-r-normal--* . Is
it a build-in fonts? Else, where can I get the fonts file?

(3) using T1LIB
I copy the FoneDataBase file to the flnx/test and modify the path accordingly
(FREETYPE_FONT_DIR=/usr/local/microwin/fonts)

No run time errors.

Unluckily, I also cannot change the font type or size as I wish.

The questions is that what am I doing wrong?
Is there any environment variables I have to define? In fact, I do change the
font type or size in Mircowindows.

By the way, where can I get more fonts?

Your help is highly appreciated.
Thank you in advance.

Hifi Wong.



Previous by date: 20 Oct 2000 03:29:57 -0000 Anybody can help me?, linuxhh
Next by date: 20 Oct 2000 03:29:57 -0000 Re: nano-x porting SA1100, Greg's email
Previous in thread:
Next in thread: 20 Oct 2000 03:29:57 -0000 Re: FLNX 0.12 - fonts problems, Jeff Moellmer


Powered by ezmlm-browse 0.20.