nanogui: Thread: BDF and TTF fonts in NanoX


[<<] [<] Page 1 of 2 [>] [>>]
Subject: BDF and TTF fonts in NanoX
From: Teemu Keskinarkaus ####@####.####
Date: 18 Dec 2006 11:51:12 +0000
Message-Id: <FB4B49604ADFD949A9F32F2D8E6C4D47018F03E1@alban.ccs.local>

Hi,

 

I'm using program that uses NanoX. That program doesn't care about fonts so
it passes the request straight to NanoX. Now I need to add more fonts to
NanoX. 

 

I already added one font to NanoX. That was BDF font that I converted to
C-file and then linked it with the NanoX. I was wondering is it possible to
use TTF fonts instead? I could use same font for several size. With BDF
fonts you need separate font for each size. I couldn't find documentation
about that or even for the BDF. I just some reverse engineering for the
NanoX and figure out how it's done. : )

 

Teemu Keskinarkaus

CC-Systems

 

Subject: RE: BDF and TTF fonts in NanoX
From: "Gil Glass" ####@####.####
Date: 18 Dec 2006 15:03:28 +0000
Message-Id: <6ECE57DF49376146B91A92A3C37EFC0E027FBF26@SJEXCH03.ds.jdsu.net>

Teemu,

You can definitely use TTF fonts with Nano-X; I've been doing it for
some time.  Nano-X works very well with TTF fonts.

Among the things you have to do are:

1.  Get hold of the FreeType library (available at the Nano-X
website???) and build it for your platform.  I've been using version
1.3.1.  I don't know much about FreeType 2 but it may have some
advantages.

2.  Set up the config file in Nano-X to indicate that TrueType fonts are
supported and to specify the location of the FreeType library (libttf.a)
and  the location of font files.  For example, my config file reads:

####################################################################
# TrueType font support thru FreeType 1.x
####################################################################
HAVE_FREETYPE_SUPPORT    = Y
INCFTLIB                 = /usr/include/freetype1
LIBFTLIB                 = ./lib/libttf.a
FREETYPE_FONT_DIR        = "fonts/truetype"

There are some hidden gotchas regarding the cross-compiling the FreeType
library for some non-x86 platforms such as ARM as I've done.  Post again
if you run into trouble.

Have I missed any details?

Cheers,
Gil Glass

-----Original Message-----
From: Teemu Keskinarkaus ####@####.#### 
Sent: Monday, December 18, 2006 6:51 AM
To: ####@####.####
Subject: BDF and TTF fonts in NanoX

Hi,

 

I'm using program that uses NanoX. That program doesn't care about fonts
so
it passes the request straight to NanoX. Now I need to add more fonts to
NanoX. 

 

I already added one font to NanoX. That was BDF font that I converted to
C-file and then linked it with the NanoX. I was wondering is it possible
to
use TTF fonts instead? I could use same font for several size. With BDF
fonts you need separate font for each size. I couldn't find
documentation
about that or even for the BDF. I just some reverse engineering for the
NanoX and figure out how it's done. : )

 

Teemu Keskinarkaus

CC-Systems

 

Subject: Re: [nanogui] RE: BDF and TTF fonts in NanoX
From: Kiran Mahajan ####@####.####
Date: 20 Dec 2006 16:49:44 +0000
Message-Id: <1166634355.3446.33.camel@KiranLinux>

Teemu,

I am also using the FreeType library to use TTF fonts with Nano-X.
As Gil said you need to port FreeType library on your platform. I am
using 1.3.1 on ARM platform and it works great.
If you want to use only TTF fonts you only need to port FreeType1
library and wont need to use FreeType2.
And make changes in config file of Nano-x as Gil has suggested!
You also need to update your fonts.dir file to use your TTF font file.
Ya another thing, you only can use either FreeType1 or FreeType2 with
Nano-X.

Thanks and regards,
Kirankumar

On Mon, 2006-12-18 at 07:03 -0800, Gil Glass wrote:
> Teemu,
> 
> You can definitely use TTF fonts with Nano-X; I've been doing it for
> some time.  Nano-X works very well with TTF fonts.
> 
> Among the things you have to do are:
> 
> 1.  Get hold of the FreeType library (available at the Nano-X
> website???) and build it for your platform.  I've been using version
> 1.3.1.  I don't know much about FreeType 2 but it may have some
> advantages.
> 
> 2.  Set up the config file in Nano-X to indicate that TrueType fonts are
> supported and to specify the location of the FreeType library (libttf.a)
> and  the location of font files.  For example, my config file reads:
> 
> ####################################################################
> # TrueType font support thru FreeType 1.x
> ####################################################################
> HAVE_FREETYPE_SUPPORT    = Y
> INCFTLIB                 = /usr/include/freetype1
> LIBFTLIB                 = ./lib/libttf.a
> FREETYPE_FONT_DIR        = "fonts/truetype"
> 
> There are some hidden gotchas regarding the cross-compiling the FreeType
> library for some non-x86 platforms such as ARM as I've done.  Post again
> if you run into trouble.
> 
> Have I missed any details?
> 
> Cheers,
> Gil Glass
> 
> -----Original Message-----
> From: Teemu Keskinarkaus ####@####.#### 
> Sent: Monday, December 18, 2006 6:51 AM
> To: ####@####.####
> Subject: BDF and TTF fonts in NanoX
> 
> Hi,
> 
>  
> 
> I'm using program that uses NanoX. That program doesn't care about fonts
> so
> it passes the request straight to NanoX. Now I need to add more fonts to
> NanoX. 
> 
>  
> 
> I already added one font to NanoX. That was BDF font that I converted to
> C-file and then linked it with the NanoX. I was wondering is it possible
> to
> use TTF fonts instead? I could use same font for several size. With BDF
> fonts you need separate font for each size. I couldn't find
> documentation
> about that or even for the BDF. I just some reverse engineering for the
> NanoX and figure out how it's done. : )
> 
>  
> 
> Teemu Keskinarkaus
> 
> CC-Systems
> 
>  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 

Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX
From: Teemu Keskinarkaus ####@####.####
Date: 21 Dec 2006 06:24:29 +0000
Message-Id: <FB4B49604ADFD949A9F32F2D8E6C4D47018F0517@alban.ccs.local>

Hi,

I already has freetype 1.3.1 ported to my platform. Only thing is that I
don't seem to be able to get TTF fonts work. My program doesn't find them.
Where should that fonts.dir - file be and what should it contain? My program
doesn't have one. Or should that file be in NanoX directory somewhere?

Teemu Keskinarkaus
CC-Systems

-----Original Message-----
From: Kiran Mahajan ####@####.#### 
Sent: 20. joulukuuta 2006 19:06
To: Teemu Keskinarkaus
Cc: Gil Glass; Nano-X
Subject: Re: [nanogui] RE: BDF and TTF fonts in NanoX

Teemu,

I am also using the FreeType library to use TTF fonts with Nano-X.
As Gil said you need to port FreeType library on your platform. I am
using 1.3.1 on ARM platform and it works great.
If you want to use only TTF fonts you only need to port FreeType1
library and wont need to use FreeType2.
And make changes in config file of Nano-x as Gil has suggested!
You also need to update your fonts.dir file to use your TTF font file.
Ya another thing, you only can use either FreeType1 or FreeType2 with
Nano-X.

Thanks and regards,
Kirankumar

On Mon, 2006-12-18 at 07:03 -0800, Gil Glass wrote:
> Teemu,
> 
> You can definitely use TTF fonts with Nano-X; I've been doing it for
> some time.  Nano-X works very well with TTF fonts.
> 
> Among the things you have to do are:
> 
> 1.  Get hold of the FreeType library (available at the Nano-X
> website???) and build it for your platform.  I've been using version
> 1.3.1.  I don't know much about FreeType 2 but it may have some
> advantages.
> 
> 2.  Set up the config file in Nano-X to indicate that TrueType fonts are
> supported and to specify the location of the FreeType library (libttf.a)
> and  the location of font files.  For example, my config file reads:
> 
> ####################################################################
> # TrueType font support thru FreeType 1.x
> ####################################################################
> HAVE_FREETYPE_SUPPORT    = Y
> INCFTLIB                 = /usr/include/freetype1
> LIBFTLIB                 = ./lib/libttf.a
> FREETYPE_FONT_DIR        = "fonts/truetype"
> 
> There are some hidden gotchas regarding the cross-compiling the FreeType
> library for some non-x86 platforms such as ARM as I've done.  Post again
> if you run into trouble.
> 
> Have I missed any details?
> 
> Cheers,
> Gil Glass
> 
> -----Original Message-----
> From: Teemu Keskinarkaus ####@####.#### 
> Sent: Monday, December 18, 2006 6:51 AM
> To: ####@####.####
> Subject: BDF and TTF fonts in NanoX
> 
> Hi,
> 
>  
> 
> I'm using program that uses NanoX. That program doesn't care about fonts
> so
> it passes the request straight to NanoX. Now I need to add more fonts to
> NanoX. 
> 
>  
> 
> I already added one font to NanoX. That was BDF font that I converted to
> C-file and then linked it with the NanoX. I was wondering is it possible
> to
> use TTF fonts instead? I could use same font for several size. With BDF
> fonts you need separate font for each size. I couldn't find
> documentation
> about that or even for the BDF. I just some reverse engineering for the
> NanoX and figure out how it's done. : )
> 
>  
> 
> Teemu Keskinarkaus
> 
> CC-Systems
> 
>  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 

Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX
From: Kiran Mahajan ####@####.####
Date: 21 Dec 2006 06:57:36 +0000
Message-Id: <1166685255.3446.10.camel@KiranLinux>

Hi Teemu,

fonts.dir should be in the directory path which you have mentioned in
the config file of Nano-X. as for example:

####################################################################
# TrueType font support thru FreeType 1.x
####################################################################
HAVE_FREETYPE_SUPPORT    = Y
INCFTLIB                 = /usr/include/freetype1
LIBFTLIB                 = /usr/lib/libttf.a
FREETYPE_FONT_DIR        = "fonts/truetype"

fonts.dir file contains name of font file, encodings and font attributes.
You need to edit that file for your font. This file should be in the 
directory where your TTF font file is. To have a sample copy how to 
write this file, go to the Nano-X's src/fonts/truetype directory. 
there you will find fonts.dir.pseudoadobe file.

Thanks and regards,
Kirankumar

On Thu, 2006-12-21 at 07:24 +0100, Teemu Keskinarkaus wrote:
> Hi,
> 
> I already has freetype 1.3.1 ported to my platform. Only thing is that I
> don't seem to be able to get TTF fonts work. My program doesn't find them.
> Where should that fonts.dir - file be and what should it contain? My program
> doesn't have one. Or should that file be in NanoX directory somewhere?
> 
> Teemu Keskinarkaus
> CC-Systems
> 


Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX
From: Teemu Keskinarkaus ####@####.####
Date: 21 Dec 2006 07:52:22 +0000
Message-Id: <FB4B49604ADFD949A9F32F2D8E6C4D47018F051F@alban.ccs.local>

Hi,

It seemed that I was missing the fonts-package. I downloaded it and now I
have that fonts.dir.pseudoadobe. There were some fonts too so I thought I'd
try it since my program was trying to use those same fonts.

I compiled the NanoX and my program. then I copied the fonts-directory to
same directory where my binary was so I had directory structure like this:

prg.binary
fonts/truetype

Still the program keeps complaining that it doesn't found fonts. For example
Times New Roman,12, Courier New, 16, Courier New 11, Arial 10 even though
they are in that fonts.dir file. I tried to copy fonts to same directory as
the binary but still nothing.

It would be nice to someway to see what file and where it's trying to find
so I could see what's wrong. Now I just have to guess.

I tried with freetype1 and freetype2 and the result was same with both. No
fonts were found.

Teemu Keskinarkaus
CC-Systems

-----Original Message-----
From: Kiran Mahajan ####@####.#### 
Sent: 21. joulukuuta 2006 9:14
To: Teemu Keskinarkaus
Cc: Nano-X
Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX

Hi Teemu,

fonts.dir should be in the directory path which you have mentioned in
the config file of Nano-X. as for example:

####################################################################
# TrueType font support thru FreeType 1.x
####################################################################
HAVE_FREETYPE_SUPPORT    = Y
INCFTLIB                 = /usr/include/freetype1
LIBFTLIB                 = /usr/lib/libttf.a
FREETYPE_FONT_DIR        = "fonts/truetype"

fonts.dir file contains name of font file, encodings and font attributes.
You need to edit that file for your font. This file should be in the 
directory where your TTF font file is. To have a sample copy how to 
write this file, go to the Nano-X's src/fonts/truetype directory. 
there you will find fonts.dir.pseudoadobe file.

Thanks and regards,
Kirankumar

On Thu, 2006-12-21 at 07:24 +0100, Teemu Keskinarkaus wrote:
> Hi,
> 
> I already has freetype 1.3.1 ported to my platform. Only thing is that I
> don't seem to be able to get TTF fonts work. My program doesn't find them.
> Where should that fonts.dir - file be and what should it contain? My
program
> doesn't have one. Or should that file be in NanoX directory somewhere?
> 
> Teemu Keskinarkaus
> CC-Systems
> 


Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX
From: Teemu Keskinarkaus ####@####.####
Date: 21 Dec 2006 09:00:57 +0000
Message-Id: <FB4B49604ADFD949A9F32F2D8E6C4D47018F0530@alban.ccs.local>

Hi,

I did some more debugging and found out something strange.

I printed the fontname - variable from engine/font_freetype.c file and for
example for arial I get fonts/truetype/Arial.tff. I copied my arial.tff to
Arial.tff, but it still complains that it cannot find it. 

And for some reason the Courier New font is called Courier New.tff and not
cour.tff or something like that what it supposed to be called regarding the
fonts.dir file.

Maybe I'm still missing something here?

Teemu Keskinarkaus
CC-Systems

-----Original Message-----
From: Kiran Mahajan ####@####.#### 
Sent: 21. joulukuuta 2006 9:14
To: Teemu Keskinarkaus
Cc: Nano-X
Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX

Hi Teemu,

fonts.dir should be in the directory path which you have mentioned in
the config file of Nano-X. as for example:

####################################################################
# TrueType font support thru FreeType 1.x
####################################################################
HAVE_FREETYPE_SUPPORT    = Y
INCFTLIB                 = /usr/include/freetype1
LIBFTLIB                 = /usr/lib/libttf.a
FREETYPE_FONT_DIR        = "fonts/truetype"

fonts.dir file contains name of font file, encodings and font attributes.
You need to edit that file for your font. This file should be in the 
directory where your TTF font file is. To have a sample copy how to 
write this file, go to the Nano-X's src/fonts/truetype directory. 
there you will find fonts.dir.pseudoadobe file.

Thanks and regards,
Kirankumar

On Thu, 2006-12-21 at 07:24 +0100, Teemu Keskinarkaus wrote:
> Hi,
> 
> I already has freetype 1.3.1 ported to my platform. Only thing is that I
> don't seem to be able to get TTF fonts work. My program doesn't find them.
> Where should that fonts.dir - file be and what should it contain? My
program
> doesn't have one. Or should that file be in NanoX directory somewhere?
> 
> Teemu Keskinarkaus
> CC-Systems
> 


Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX
From: "Gil Glass" ####@####.####
Date: 21 Dec 2006 16:04:38 +0000
Message-Id: <6ECE57DF49376146B91A92A3C37EFC0E028460F1@SJEXCH03.ds.jdsu.net>

I'm not familiar with the fonts.dir file.  I don't recall creating it
and I don't believe it exists anywhere on my target or in the Nano-X
hierarchy on the host system.

Did you make sure that the MWFONTDIR environment variable is set
correctly?  This is the only way, that I know of, that Nano-X finds font
files.  The other option would be to specify the path explicitly in the
GrCreateFont() call, e.g. 

GR_FONT_ID myNewFont;
myNewFont = GrCreateFont("/where/the/fonts/are/arial.ttf", 12, NULL);


Cheers,
Gil

-----Original Message-----
From: Teemu Keskinarkaus ####@####.#### 
Sent: Thursday, December 21, 2006 1:24 AM
To: Kiran Mahajan
Cc: Gil Glass; Nano-X
Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX

Hi,

I already has freetype 1.3.1 ported to my platform. Only thing is that I
don't seem to be able to get TTF fonts work. My program doesn't find
them.
Where should that fonts.dir - file be and what should it contain? My
program
doesn't have one. Or should that file be in NanoX directory somewhere?

Teemu Keskinarkaus
CC-Systems

-----Original Message-----
From: Kiran Mahajan ####@####.#### 
Sent: 20. joulukuuta 2006 19:06
To: Teemu Keskinarkaus
Cc: Gil Glass; Nano-X
Subject: Re: [nanogui] RE: BDF and TTF fonts in NanoX

Teemu,

I am also using the FreeType library to use TTF fonts with Nano-X.
As Gil said you need to port FreeType library on your platform. I am
using 1.3.1 on ARM platform and it works great.
If you want to use only TTF fonts you only need to port FreeType1
library and wont need to use FreeType2.
And make changes in config file of Nano-x as Gil has suggested!
You also need to update your fonts.dir file to use your TTF font file.
Ya another thing, you only can use either FreeType1 or FreeType2 with
Nano-X.

Thanks and regards,
Kirankumar

On Mon, 2006-12-18 at 07:03 -0800, Gil Glass wrote:
> Teemu,
> 
> You can definitely use TTF fonts with Nano-X; I've been doing it for
> some time.  Nano-X works very well with TTF fonts.
> 
> Among the things you have to do are:
> 
> 1.  Get hold of the FreeType library (available at the Nano-X
> website???) and build it for your platform.  I've been using version
> 1.3.1.  I don't know much about FreeType 2 but it may have some
> advantages.
> 
> 2.  Set up the config file in Nano-X to indicate that TrueType fonts
are
> supported and to specify the location of the FreeType library
(libttf.a)
> and  the location of font files.  For example, my config file reads:
> 
> ####################################################################
> # TrueType font support thru FreeType 1.x
> ####################################################################
> HAVE_FREETYPE_SUPPORT    = Y
> INCFTLIB                 = /usr/include/freetype1
> LIBFTLIB                 = ./lib/libttf.a
> FREETYPE_FONT_DIR        = "fonts/truetype"
> 
> There are some hidden gotchas regarding the cross-compiling the
FreeType
> library for some non-x86 platforms such as ARM as I've done.  Post
again
> if you run into trouble.
> 
> Have I missed any details?
> 
> Cheers,
> Gil Glass
> 
> -----Original Message-----
> From: Teemu Keskinarkaus ####@####.#### 
> Sent: Monday, December 18, 2006 6:51 AM
> To: ####@####.####
> Subject: BDF and TTF fonts in NanoX
> 
> Hi,
> 
>  
> 
> I'm using program that uses NanoX. That program doesn't care about
fonts
> so
> it passes the request straight to NanoX. Now I need to add more fonts
to
> NanoX. 
> 
>  
> 
> I already added one font to NanoX. That was BDF font that I converted
to
> C-file and then linked it with the NanoX. I was wondering is it
possible
> to
> use TTF fonts instead? I could use same font for several size. With
BDF
> fonts you need separate font for each size. I couldn't find
> documentation
> about that or even for the BDF. I just some reverse engineering for
the
> NanoX and figure out how it's done. : )
> 
>  
> 
> Teemu Keskinarkaus
> 
> CC-Systems
> 
>  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 

Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX
From: Teemu Keskinarkaus ####@####.####
Date: 22 Dec 2006 07:30:23 +0000
Message-Id: <FB4B49604ADFD949A9F32F2D8E6C4D47018F055C@alban.ccs.local>

I did some debugging, I'm not sure if you saw the posts, and the
freetype_createfont is trying to open fonts/truetype/Arial.tff. I have that
directory and file but still it doesn't seem to find right kind of data.
Another thing is that if I use Courier New - font, then it's trying to find
font from file Courier New.tff so I think I have some kind of principle
problem here.

I'm kind of confused here too because some say that I should use fonts.dir -
file and some say that I don't need it. 

I did some _more_ testing with Freetype2 and results are here:

Nano-X-Freetype2: Adding new font: fonts/truetype/Arial.ttf
Loading font from file 'fonts/truetype/Arial.ttf' @ freetype2_face_requester
Nano-X-Freetype2: Freetype 2 error 1 trying to load font.

from directory where binary was driven there is fonts/truetype/Arial.tff
file, but it seems that either the program for some reason cannot open it or
it tries to read something else from there that actually there is. 

Teemu Keskinarkaus
CC-Systems

-----Original Message-----
From: Gil Glass ####@####.#### 
Sent: 21. joulukuuta 2006 18:05
To: Teemu Keskinarkaus; Kiran Mahajan
Cc: Nano-X
Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX

I'm not familiar with the fonts.dir file.  I don't recall creating it
and I don't believe it exists anywhere on my target or in the Nano-X
hierarchy on the host system.

Did you make sure that the MWFONTDIR environment variable is set
correctly?  This is the only way, that I know of, that Nano-X finds font
files.  The other option would be to specify the path explicitly in the
GrCreateFont() call, e.g. 

GR_FONT_ID myNewFont;
myNewFont = GrCreateFont("/where/the/fonts/are/arial.ttf", 12, NULL);


Cheers,
Gil

-----Original Message-----
From: Teemu Keskinarkaus ####@####.#### 
Sent: Thursday, December 21, 2006 1:24 AM
To: Kiran Mahajan
Cc: Gil Glass; Nano-X
Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX

Hi,

I already has freetype 1.3.1 ported to my platform. Only thing is that I
don't seem to be able to get TTF fonts work. My program doesn't find
them.
Where should that fonts.dir - file be and what should it contain? My
program
doesn't have one. Or should that file be in NanoX directory somewhere?

Teemu Keskinarkaus
CC-Systems

-----Original Message-----
From: Kiran Mahajan ####@####.#### 
Sent: 20. joulukuuta 2006 19:06
To: Teemu Keskinarkaus
Cc: Gil Glass; Nano-X
Subject: Re: [nanogui] RE: BDF and TTF fonts in NanoX

Teemu,

I am also using the FreeType library to use TTF fonts with Nano-X.
As Gil said you need to port FreeType library on your platform. I am
using 1.3.1 on ARM platform and it works great.
If you want to use only TTF fonts you only need to port FreeType1
library and wont need to use FreeType2.
And make changes in config file of Nano-x as Gil has suggested!
You also need to update your fonts.dir file to use your TTF font file.
Ya another thing, you only can use either FreeType1 or FreeType2 with
Nano-X.

Thanks and regards,
Kirankumar

On Mon, 2006-12-18 at 07:03 -0800, Gil Glass wrote:
> Teemu,
> 
> You can definitely use TTF fonts with Nano-X; I've been doing it for
> some time.  Nano-X works very well with TTF fonts.
> 
> Among the things you have to do are:
> 
> 1.  Get hold of the FreeType library (available at the Nano-X
> website???) and build it for your platform.  I've been using version
> 1.3.1.  I don't know much about FreeType 2 but it may have some
> advantages.
> 
> 2.  Set up the config file in Nano-X to indicate that TrueType fonts
are
> supported and to specify the location of the FreeType library
(libttf.a)
> and  the location of font files.  For example, my config file reads:
> 
> ####################################################################
> # TrueType font support thru FreeType 1.x
> ####################################################################
> HAVE_FREETYPE_SUPPORT    = Y
> INCFTLIB                 = /usr/include/freetype1
> LIBFTLIB                 = ./lib/libttf.a
> FREETYPE_FONT_DIR        = "fonts/truetype"
> 
> There are some hidden gotchas regarding the cross-compiling the
FreeType
> library for some non-x86 platforms such as ARM as I've done.  Post
again
> if you run into trouble.
> 
> Have I missed any details?
> 
> Cheers,
> Gil Glass
> 
> -----Original Message-----
> From: Teemu Keskinarkaus ####@####.#### 
> Sent: Monday, December 18, 2006 6:51 AM
> To: ####@####.####
> Subject: BDF and TTF fonts in NanoX
> 
> Hi,
> 
>  
> 
> I'm using program that uses NanoX. That program doesn't care about
fonts
> so
> it passes the request straight to NanoX. Now I need to add more fonts
to
> NanoX. 
> 
>  
> 
> I already added one font to NanoX. That was BDF font that I converted
to
> C-file and then linked it with the NanoX. I was wondering is it
possible
> to
> use TTF fonts instead? I could use same font for several size. With
BDF
> fonts you need separate font for each size. I couldn't find
> documentation
> about that or even for the BDF. I just some reverse engineering for
the
> NanoX and figure out how it's done. : )
> 
>  
> 
> Teemu Keskinarkaus
> 
> CC-Systems
> 
>  
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 

Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX
From: Kiran Mahajan ####@####.####
Date: 22 Dec 2006 07:53:30 +0000
Message-Id: <1166774944.3449.7.camel@KiranLinux>

On Fri, 2006-12-22 at 08:29 +0100, Teemu Keskinarkaus wrote:
> freetype_createfont is trying to open fonts/truetype/Arial.tff. I have that
>
here your file extension is ".tff"

> Nano-X-Freetype2: Adding new font: fonts/truetype/Arial.ttf
> Loading font from file 'fonts/truetype/Arial.ttf' @ freetype2_face_requester
> Nano-X-Freetype2: Freetype 2 error 1 trying to load font.
> 
here Nano-X is trying to find file with extension ".ttf"

> from directory where binary was driven there is fonts/truetype/Arial.tff
>
and font file in your fonts directory here is of extesion ".tff"

I think you need to check file names. do changes accordingly and see if
it works!

thanks and regards,
Kirankumar

> Teemu Keskinarkaus
> CC-Systems
> 
> -----Original Message-----
> From: Gil Glass ####@####.#### 
> Sent: 21. joulukuuta 2006 18:05
> To: Teemu Keskinarkaus; Kiran Mahajan
> Cc: Nano-X
> Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX
> 
> I'm not familiar with the fonts.dir file.  I don't recall creating it
> and I don't believe it exists anywhere on my target or in the Nano-X
> hierarchy on the host system.
> 
> Did you make sure that the MWFONTDIR environment variable is set
> correctly?  This is the only way, that I know of, that Nano-X finds font
> files.  The other option would be to specify the path explicitly in the
> GrCreateFont() call, e.g. 
> 
> GR_FONT_ID myNewFont;
> myNewFont = GrCreateFont("/where/the/fonts/are/arial.ttf", 12, NULL);
> 
> 
> Cheers,
> Gil
> 
> -----Original Message-----
> From: Teemu Keskinarkaus ####@####.#### 
> Sent: Thursday, December 21, 2006 1:24 AM
> To: Kiran Mahajan
> Cc: Gil Glass; Nano-X
> Subject: RE: [nanogui] RE: BDF and TTF fonts in NanoX
> 
> Hi,
> 
> I already has freetype 1.3.1 ported to my platform. Only thing is that I
> don't seem to be able to get TTF fonts work. My program doesn't find
> them.
> Where should that fonts.dir - file be and what should it contain? My
> program
> doesn't have one. Or should that file be in NanoX directory somewhere?
> 
> Teemu Keskinarkaus
> CC-Systems
> 
> -----Original Message-----
> From: Kiran Mahajan ####@####.#### 
> Sent: 20. joulukuuta 2006 19:06
> To: Teemu Keskinarkaus
> Cc: Gil Glass; Nano-X
> Subject: Re: [nanogui] RE: BDF and TTF fonts in NanoX
> 
> Teemu,
> 
> I am also using the FreeType library to use TTF fonts with Nano-X.
> As Gil said you need to port FreeType library on your platform. I am
> using 1.3.1 on ARM platform and it works great.
> If you want to use only TTF fonts you only need to port FreeType1
> library and wont need to use FreeType2.
> And make changes in config file of Nano-x as Gil has suggested!
> You also need to update your fonts.dir file to use your TTF font file.
> Ya another thing, you only can use either FreeType1 or FreeType2 with
> Nano-X.
> 
> Thanks and regards,
> Kirankumar
> 
> On Mon, 2006-12-18 at 07:03 -0800, Gil Glass wrote:
> > Teemu,
> > 
> > You can definitely use TTF fonts with Nano-X; I've been doing it for
> > some time.  Nano-X works very well with TTF fonts.
> > 
> > Among the things you have to do are:
> > 
> > 1.  Get hold of the FreeType library (available at the Nano-X
> > website???) and build it for your platform.  I've been using version
> > 1.3.1.  I don't know much about FreeType 2 but it may have some
> > advantages.
> > 
> > 2.  Set up the config file in Nano-X to indicate that TrueType fonts
> are
> > supported and to specify the location of the FreeType library
> (libttf.a)
> > and  the location of font files.  For example, my config file reads:
> > 
> > ####################################################################
> > # TrueType font support thru FreeType 1.x
> > ####################################################################
> > HAVE_FREETYPE_SUPPORT    = Y
> > INCFTLIB                 = /usr/include/freetype1
> > LIBFTLIB                 = ./lib/libttf.a
> > FREETYPE_FONT_DIR        = "fonts/truetype"
> > 
> > There are some hidden gotchas regarding the cross-compiling the
> FreeType
> > library for some non-x86 platforms such as ARM as I've done.  Post
> again
> > if you run into trouble.
> > 
> > Have I missed any details?
> > 
> > Cheers,
> > Gil Glass
> > 
> > -----Original Message-----
> > From: Teemu Keskinarkaus ####@####.#### 
> > Sent: Monday, December 18, 2006 6:51 AM
> > To: ####@####.####
> > Subject: BDF and TTF fonts in NanoX
> > 
> > Hi,
> > 
> >  
> > 
> > I'm using program that uses NanoX. That program doesn't care about
> fonts
> > so
> > it passes the request straight to NanoX. Now I need to add more fonts
> to
> > NanoX. 
> > 
> >  
> > 
> > I already added one font to NanoX. That was BDF font that I converted
> to
> > C-file and then linked it with the NanoX. I was wondering is it
> possible
> > to
> > use TTF fonts instead? I could use same font for several size. With
> BDF
> > fonts you need separate font for each size. I couldn't find
> > documentation
> > about that or even for the BDF. I just some reverse engineering for
> the
> > NanoX and figure out how it's done. : )
> > 
> >  
> > 
> > Teemu Keskinarkaus
> > 
> > CC-Systems
> > 
> >  
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ####@####.####
> > For additional commands, e-mail: ####@####.####
> > 

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


Powered by ezmlm-browse 0.20.