nanogui: Font usage/setup


Previous by date: 6 Jan 2006 23:03:07 +0000 Re: an unusual square.., Martin Kajdas
Next by date: 6 Jan 2006 23:03:07 +0000 Re: Font usage/setup, Martin Kajdas
Previous in thread: 6 Jan 2006 23:03:07 +0000 Re: Font usage/setup, Martin Kajdas
Next in thread: 6 Jan 2006 23:03:07 +0000 Re: Font usage/setup, Martin Kajdas

Subject: RE: [nanogui] Font usage/setup
From: "Martin Kajdas" ####@####.####
Date: 6 Jan 2006 23:03:07 +0000
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC2291497@mkmail.MKPROD.COM>

I have a clue.
I was using fonts from my /usr/lib/X11/fonts/misc directory of my X11 machine.
When I replaced 6x13 (= 'fixed') font from that directory with the 6x13 font from /microwin/src/fonts/pcf directory (the same filename), my system did not crash anymore.

Can anybody explain why 6x13.pcf.gz from microwin directory works and one from X11 directory hangs nano-X.
Obviously they are different, the size is slightly different, but I thought that they are interchangeable.
I used X11 to develop my application, and I wanted to use its fonts.

Any ideas? Different/wrong compression?

Martin




-----Original Message-----
From: Martin Kajdas 
Sent: Friday, January 06, 2006 10:21 AM
To: 'Greg Haerr'; ####@####.####
Subject: RE: [nanogui] Font usage/setup


I put some printf's into LoadFont.c (nxlib-0.45) and determined that my font file is found correctly (see previous email), the path and name of the file is also correct, but when it calls GrCreateFont(), it never returns 
and 'lost connection with Nano-X server' is shown.

I will be tracing it into nano-X server now, but any ideas are appreciated.
Martin


-----Original Message-----
From: Martin Kajdas 
Sent: Friday, January 06, 2006 9:34 AM
To: 'Greg Haerr'; ####@####.####
Subject: RE: [nanogui] Font usage/setup


I am still struggling with this.
I enabled the debug modes, checked the font directories in make files and configs (they were OK).
The debug output showed that the server looks at all of the fonts but does not find what it likes.
The application aborts with 'connection lost with server'.

I looked at the source code and noticed that it uses fonts.dir but not fonts.alias
I ported the aliases from fonts.alias to fonts.dir
When I run the application now, it seems that it finds the font right away (debug output) but it still aborts with 'connection lost with server'.
If I delete all my fonts and fonts.dir, the application runs OK with built it fonts.

Any ideas what goes wrong?
Is nano-X crashing because it does something with the font?
Is it still missing something?

By the way, my application+libnx and nano-X are built statically and I do not use shared libraries anywhere.

Martin


-----Original Message-----
From: Greg Haerr ####@####.####
Sent: Wednesday, January 04, 2006 2:32 PM
To: Martin Kajdas; ####@####.####
Subject: Re: [nanogui] Font usage/setup


> I enabled PCF fonts support in config file, I copied PCF font files into
/usr/lib/X11/fonts directory of my ram disk.

How exactly fonts work in nano-X:
- are they compiled in?
- if not, where should they be located to be available? where and how are
they searched?
- what options need to be turned on?


Font locations are set in both the microwindows config file,
as well as in the NXLIB Makefile.  Make sure that these
are set properly.

The NXLIB library adds its own paths in front of the file names,
according to code in SetFont.c (or something like that, grep
for GrCreateFont).  When Microwindows gets a font spec,
it will attempt to load the file once if it starts with '/', otherwise,
it will use its own search mechanism, dependent on config file
setting and font loader.

If you turn on debug mode, then microwindows should print
the path it tries for every font.  Same for NXLIB.

Regards,

Greg


Previous by date: 6 Jan 2006 23:03:07 +0000 Re: an unusual square.., Martin Kajdas
Next by date: 6 Jan 2006 23:03:07 +0000 Re: Font usage/setup, Martin Kajdas
Previous in thread: 6 Jan 2006 23:03:07 +0000 Re: Font usage/setup, Martin Kajdas
Next in thread: 6 Jan 2006 23:03:07 +0000 Re: Font usage/setup, Martin Kajdas


Powered by ezmlm-browse 0.20.