nanogui: FLNX 0.12 - fonts problems


Previous by date: 20 Oct 2000 17:27:30 -0000 custom calls to driver, David Erickson
Next by date: 20 Oct 2000 17:27:30 -0000 Re: custom calls to driver, Alex Holden
Previous in thread: 20 Oct 2000 17:27:30 -0000 FLNX 0.12 - fonts problems, eric_wong.vtech.com
Next in thread: 20 Oct 2000 17:27:30 -0000 Re: FLNX 0.12 - fonts problems, Greg's email

Subject: Re: FLNX 0.12 - fonts problems
From: Jeff Moellmer ####@####.####
Date: 20 Oct 2000 17:27:30 -0000
Message-Id: <39F081BF.6D28B77B@censoft.com>

Hi Eric,

Here is what I've discovered... To get HZKFONT to supposedly work under FLNX, you
must do three things. First, edit microwin/src/config. Second, edit
flnx/src/fl_font.cxx. Third, recompile.

1. microwin/src/confg:
    A. Turn on HZK font support:

            HAVE_HZK_SUPPORT         = "Y";

    B. Tell microwindows *exactly* where it is exactly (not a relative path):

            HZK_FONT_DIR                     =
"/home/jeffm/microwin/src/fonts/chinese"

2. flnx/src/fl_font.cxx:

    A. Only use HZFONT in the fonts section:

static Fl_Fontdesc built_in_table[] = {
  {"HZKFONT"}
/*
{"/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"}
*/
};

3. Recompile both mircowindows and FLNX.

Afterwards, when you run a flnx applications you should see something like this:

this is in nano-X
Nano-X don't support get_mouse(x,y)in file(Fl_X.cxx)
hzk_createfont(HZKFONT,16)
Loading Chinese HZK font from
file(/home/jeffm/microwin/src/fonts/chinese/hzk16)...done.
Loading ASCII HZK font...done.

Try this out, however, there seems to be problems with displaying the fonts in some
FLNX. For example, even though the fonts load, the fonts test demo program seg
faults every time!

I'll have to talk with Greg and get some more details, but we'll get it working.
Chinese font support is very important.

Thanks,

Jeff

####@####.#### wrote:

> 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 17:27:30 -0000 custom calls to driver, David Erickson
Next by date: 20 Oct 2000 17:27:30 -0000 Re: custom calls to driver, Alex Holden
Previous in thread: 20 Oct 2000 17:27:30 -0000 FLNX 0.12 - fonts problems, eric_wong.vtech.com
Next in thread: 20 Oct 2000 17:27:30 -0000 Re: FLNX 0.12 - fonts problems, Greg's email


Powered by ezmlm-browse 0.20.