nanogui: Thread: Fonts in nano-X, nxlib, FLTK


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Fonts in nano-X, nxlib, FLTK
From: albrecht ellinger ####@####.####
Date: 22 Nov 2006 07:59:56 +0000
Message-Id: <1164182519.29948.24.camel@albrechtLinux.site>

Hullo,

I have a cross compile environment.

The t1demo programme works just wonderful.
But I can not see any of these beautiful fonts
in FLTK. 

I put the fonts in the according paths of nxlib.
To avoid using TTF, I transformed helvetica.ttf
to pcf.gz in the size of 24pt. 

When I load this font the programme crashes.
Nano-X just stops in "fonts" programme.

_______
Output:
...
 checking 
 '-adobe-helvetica-bold-r-normal--34-240-100-100-p-182-iso8859-1'
 '-adobe-helvetica-bold-r-normal--17-120-100-100-p-92-iso8859-1'
 checking   
 '-adobe-helvetica-bold-r-normal--34-240-100-100-p-182-iso8859-1'
 '-adobe-helvetica-bold-r-normal--34-240-100-100-p-182-iso8859-1'

fnt_createfont: /usr/lib/X11/fonts/100dpi/helvB24.pcf.gz,0 not found

[1] - Segmentation fault         ./nano-X


I would like to know the interface for the fonts better.
How can I get FLTK to use the same fonts, nano-X uses?

Have a nice day

Albrecht





Subject: Re: [nanogui] Fonts in nano-X, nxlib, FLTK
From: "Greg Haerr" ####@####.####
Date: 22 Nov 2006 20:06:27 +0000
Message-Id: <185f01c70e71$af5e13a0$0300a8c0@RDP>

:  '-adobe-helvetica-bold-r-normal--34-240-100-100-p-182-iso8859-1'
: 
: fnt_createfont: /usr/lib/X11/fonts/100dpi/helvB24.pcf.gz,0 not found
: 
: [1] - Segmentation fault         ./nano-X

We need a nano-X gdb backtrace to help find exactly
where it's dying.


: How can I get FLTK to use the same fonts, nano-X uses?

I'm not a FLTK expert, but I think there's a file where
the font pathnames are hardcoded for each FLTK font.

Regards,

Greg

Subject: Re: [nanogui] Fonts in nano-X, nxlib, FLTK
From: albrecht ellinger ####@####.####
Date: 23 Nov 2006 12:08:33 +0000
Message-Id: <1164283932.18206.65.camel@albrechtLinux.site>

Am Mittwoch, den 22.11.2006, 13:06 -0700 schrieb Greg Haerr:
> :  '-adobe-helvetica-bold-r-normal--34-240-100-100-p-182-iso8859-1'
> : 
> : fnt_createfont: /usr/lib/X11/fonts/100dpi/helvB24.pcf.gz,0 not found
> : 
> : [1] - Segmentation fault         ./nano-X
> 
> We need a nano-X gdb backtrace to help find exactly
> where it's dying.
> 
Thank you very much for your help.
I have to recompile microwindows 0.90 to support debugging.

I switched to microwindows 0.91 in the mean time.
Now the error has changed. It crashes all the same.

[1] + Bus error                  nano-X -p

sometimes still:

[1] + Segmentation fault         nano-X -p

This time I have FreeType support configured.

Currently I am applying mkajdas threads patch 
"font_pcf-patch.tar.bz2"

(in Subject:RE: [nanogui] Font usage/setup)


> 
> I'm not a FLTK expert, but I think there's a file where
> the font pathnames are hardcoded for each FLTK font.

Do you mean fonts.dir made by mkfontdir utility? Yes it is there.
 
Thank you

Bye

Albrecht


Subject: Re: [nanogui] Fonts in nano-X, nxlib, FLTK
From: albrecht ellinger ####@####.####
Date: 24 Nov 2006 08:54:59 +0000
Message-Id: <1164358685.8258.3.camel@albrechtLinux.site>

> > :  '-adobe-helvetica-bold-r-normal--34-240-100-100-p-182-iso8859-1'
> > : 
> > : fnt_createfont: /usr/lib/X11/fonts/100dpi/helvB24.pcf.gz,0 not found
> > : 
> > : [1] - Segmentation fault         ./nano-X
> > 
> > We need a nano-X gdb backtrace to help find exactly
> > where it's dying.

It is not needed any more. The patch "font_pcf-patch.tar.bz2"
for 0.92 fixed it. Thank you very much for your help. You are
doing a great job.

Bye

Albrecht

Subject: Re: [nanogui] Fonts in nano-X, nxlib, FLTK
From: "Greg Haerr" ####@####.####
Date: 26 Nov 2006 06:07:44 +0000
Message-Id: <198101c71121$2c6f67c0$6401a8c0@winXP>

: > I'm not a FLTK expert, but I think there's a file where
: > the font pathnames are hardcoded for each FLTK font.
: 
: Do you mean fonts.dir made by mkfontdir utility? Yes it is there.

No, I was talking about font names coded in the FLTK source.
NXLIB uses fonts.dir, I'm not sure whether FLTK also does.

Regards,

Greg
Subject: Re: [nanogui] Fonts in nano-X, nxlib, FLTK
From: albrecht ellinger ####@####.####
Date: 28 Nov 2006 08:02:23 +0000
Message-Id: <1164701053.5177.21.camel@albrechtLinux.site>

Hello,

> ... font names coded in the FLTK source. NXLIB uses fonts.dir...

Yes in Enumerations.H font names are specified. But they are useless
when the fonts are not found.

There are no font paths hardcoded in FLTK.
I have to scan the font names provided by nxlib.
The function Fl::set_fonts(...) receives all the fonts
and the number of fonts found is returned.
Then catch the number of the font I want to use
by comparing the font names with the font I like
to use.
The function get_font_name(...) is handy:

Fl::get_font_name((Fl_Font)i);

at last 

o->labelfont(i); is used to set the font.

There _should_ be a direct way, but that did not 
work for me: 

// find the next free slot in the font table (1.1.x)
 Fl_Font myFont = Fl_Font(FL_FREE_FONT + 1);
// load the required font in this slot
 Fl::set_font(myFont, "tahomaRus12.pcf.gz");
// use the font
o->labelfont(myFont);

Does someone know how to get the direct way to work?
(This is a little bit off topic here I know)

Thank you for your time

Albrecht


[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.