nanogui: Thread: Font usage/setup


[<<] [<] Page 1 of 3 [>] [>>]
Subject: Font usage/setup
From: "Martin Kajdas" ####@####.####
Date: 4 Jan 2006 21:55:42 +0000
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC2291492@mkmail.MKPROD.COM>

My question is about font usage and setup.
I have an embedded system running linux 2.6.13.5 with nano-X and my FLTK/libnx application from a ram disk.
When testing on X11, everything worked great.
When running on embedded system, I do not have any fonts available except the default one.

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?

I would appreciate some info on fonts usage/setup when running without X11.
Martin
Subject: Re: [nanogui] Font usage/setup
From: "Greg Haerr" ####@####.####
Date: 4 Jan 2006 22:31:33 +0000
Message-Id: <01f401c6117e$b25a6d60$0300a8c0@RDP>

> 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

Subject: RE: [nanogui] Font usage/setup
From: "Martin Kajdas" ####@####.####
Date: 6 Jan 2006 17:33:58 +0000
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC2291493@mkmail.MKPROD.COM>

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

Subject: RE: [nanogui] Font usage/setup
From: "Martin Kajdas" ####@####.####
Date: 6 Jan 2006 18:21:31 +0000
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC2291494@mkmail.MKPROD.COM>

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

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

Subject: RE: [nanogui] Font usage/setup
From: "Martin Kajdas" ####@####.####
Date: 7 Jan 2006 00:08:27 +0000
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC2291498@mkmail.MKPROD.COM>

I found the fix:
ftp://microwindows.censoft.com/pub/microwindows/patch-0.92/font_pcf-patch.tar.bz2

I am using the latest CVS source code and after I installed this file, the problem with X11 fonts disappeared.
I guess this is waiting to be applied to CVS.
I hope it can be reviewed and applied soon.

Martin



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


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


---------------------------------------------------------------------
To unsubscribe, e-mail: ####@####.####
For additional commands, e-mail: ####@####.####

Subject: Re: [nanogui] Font usage/setup
From: "Greg Haerr" ####@####.####
Date: 9 Jan 2006 20:06:40 +0000
Message-Id: <0fa901c61557$fd01f5e0$6401a8c0@winXP>

>
ftp://microwindows.censoft.com/pub/microwindows/patch-0.92/font_pcf-patch.tar.bz2

> I am using the latest CVS source code and after I installed this file, the
problem with X11 fonts disappeared.
I guess this is waiting to be applied to CVS.
I hope it can be reviewed and applied soon.

Martin -
    I thought I had applied all the PCF patches to CVS, I'll check on
this.  I think the reason for your crash is that the PCF files weren't
being read properly by your target machine that is running a different
endianness than the development machine.

Regards,

Greg

Subject: RE: [nanogui] Font usage/setup
From: "Martin Kajdas" ####@####.####
Date: 9 Jan 2006 22:03:35 +0000
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC2291499@mkmail.MKPROD.COM>

My development machine is Linux i386 with X11, and my target machine is Linux i386 with nano-X.
It is actually running on the same brand/type of motherboard.

The version of the font_pcf.c in CVS is from 2003 and the fix is from 2005, so it does not appear to be applied.

Martin

-----Original Message-----
From: Greg Haerr ####@####.####
Sent: Monday, January 09, 2006 12:05 PM
To: Martin Kajdas; ####@####.####
Subject: Re: [nanogui] Font usage/setup


>
ftp://microwindows.censoft.com/pub/microwindows/patch-0.92/font_pcf-patch.tar.bz2

> I am using the latest CVS source code and after I installed this file, the
problem with X11 fonts disappeared.
I guess this is waiting to be applied to CVS.
I hope it can be reviewed and applied soon.

Martin -
    I thought I had applied all the PCF patches to CVS, I'll check on
this.  I think the reason for your crash is that the PCF files weren't
being read properly by your target machine that is running a different
endianness than the development machine.

Regards,

Greg

Subject: RE: [nanogui] Font usage/setup
From: "Martin Kajdas" ####@####.####
Date: 10 Jan 2006 00:00:04 +0000
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC229149A@mkmail.MKPROD.COM>

Another problem: truetype fonts.
I have the fonts working and I can see the truetype fonts in the list of fonts (with my application on my target system), but I cannot make them work.
The other ones work fine.

I compiled nano-X with HAVE_FREETYPE_SUPPORT enabled and linked with freetype 1.3.1 library.
I added the font files to the fonts directory and added them to the fonts.dir file.
- is there anything else that needs to be done to get them working?
- does nxlib-0.45 support truetype fonts?
- anything else I need to know?

Regards,
Martin



-----Original Message-----
From: Martin Kajdas 
Sent: Monday, January 09, 2006 2:03 PM
To: 'Greg Haerr'; ####@####.####
Subject: RE: [nanogui] Font usage/setup


My development machine is Linux i386 with X11, and my target machine is Linux i386 with nano-X.
It is actually running on the same brand/type of motherboard.

The version of the font_pcf.c in CVS is from 2003 and the fix is from 2005, so it does not appear to be applied.

Martin

-----Original Message-----
From: Greg Haerr ####@####.####
Sent: Monday, January 09, 2006 12:05 PM
To: Martin Kajdas; ####@####.####
Subject: Re: [nanogui] Font usage/setup


>
ftp://microwindows.censoft.com/pub/microwindows/patch-0.92/font_pcf-patch.tar.bz2

> I am using the latest CVS source code and after I installed this file, the
problem with X11 fonts disappeared.
I guess this is waiting to be applied to CVS.
I hope it can be reviewed and applied soon.

Martin -
    I thought I had applied all the PCF patches to CVS, I'll check on
this.  I think the reason for your crash is that the PCF files weren't
being read properly by your target machine that is running a different
endianness than the development machine.

Regards,

Greg

Subject: RE: [nanogui] Font usage/setup
From: "Martin Kajdas" ####@####.####
Date: 10 Jan 2006 17:23:20 +0000
Message-Id: <CF2BB830A62F914F848E5AD5FFF57AC229149B@mkmail.MKPROD.COM>

I enabled debug mode to see what is going on and the problem became obvious.

The nano-X server (actually nxlib in LoadFont.c) searches for:
'-adobe-helvetica-medium-r-normal--12-0-0-0-p-0-iso8859-1'
which my application requires and the truetype font available is described as:
'-adobe-helvetica-medium-r-normal--0-0-0-0-p-0-iso8859-1'

They do not match and the server does not find the font correctly.
The only difference is in the font size (the app wants size 12).
However, this being the truetype font, does not specify size (equals to 0).

How can I tell/configure the server/nxlib to match these properly?
Martin


-----Original Message-----
From: Martin Kajdas ####@####.####
Sent: Monday, January 09, 2006 4:00 PM
To: Greg Haerr; ####@####.####
Subject: RE: [nanogui] Font usage/setup


Another problem: truetype fonts.
I have the fonts working and I can see the truetype fonts in the list of fonts (with my application on my target system), but I cannot make them work.
The other ones work fine.

I compiled nano-X with HAVE_FREETYPE_SUPPORT enabled and linked with freetype 1.3.1 library.
I added the font files to the fonts directory and added them to the fonts.dir file.
- is there anything else that needs to be done to get them working?
- does nxlib-0.45 support truetype fonts?
- anything else I need to know?

Regards,
Martin
[<<] [<] Page 1 of 3 [>] [>>]


Powered by ezmlm-browse 0.20.