nanogui: how to cross compile FreeType font freetype1.3.1


Previous by date: 3 Jul 2007 17:37:48 +0100 Re: Interfacing problem: How do I connect my touchscreen driver to nano-X?, Laine Walker-Avina
Next by date: 3 Jul 2007 17:37:48 +0100 Re: how to cross compile FreeType font freetype1.3.1, Thomas Malkus
Previous in thread: 3 Jul 2007 17:37:48 +0100 Re: how to cross compile FreeType font freetype1.3.1, Thomas Malkus
Next in thread: 3 Jul 2007 17:37:48 +0100 Re: how to cross compile FreeType font freetype1.3.1, Thomas Malkus

Subject: RE: [nanogui] how to cross compile FreeType font freetype1.3.1
From: "Allen Yang" ####@####.####
Date: 3 Jul 2007 17:37:48 +0100
Message-Id: <33B07717EB1E594F934D63BE3BDA5A3F87F28F@itexch01.nucomm.local>

Hi, Thomas.

Thank you very much for your info. It's very helpful.

I am using microwindows 0.90, freetype-2.1.7, ColdFire MCF5329 and
uClinux 2.6.17.

I used the following commands to configure my toolchain:

export
CC=/opt/freescale/usr/local/gcc-4.1-uclibc-0.9/m68k-uclibc/bin/m68k-ucli
nux-gcc
export
CXX=/opt/freescale/usr/local/gcc-4.1-uclibc-0.9/m68k-uclibc/bin/m68k-ucl
inux-g++
export
CPP=/opt/freescale/usr/local/gcc-4.1-uclibc-0.9/m68k-uclibc/bin/m68k-ucl
inux-cpp
export
AR=/opt/freescale/usr/local/gcc-4.1-uclibc-0.9/m68k-uclibc/bin/m68k-ucli
nux-ar
export
RANLIB=/opt/freescale/usr/local/gcc-4.1-uclibc-0.9/m68k-uclibc/bin/m68k-
uclinux-ranlib
export
STRIP=/opt/freescale/usr/local/gcc-4.1-uclibc-0.9/m68k-uclibc/bin/m68k-u
clinux-strip

Then I use the following line to configure freetype-2.1.7:

./configure --host=m68k-uclinux --enable-static

I am not sure if "--host=m68k-uclinux" is correct. Can you give your
opinion?

Then I did "make".

The compilation was successful.

Then I changed config of microwindows like this:

FREETYPE_FONT_DIR=/home/hiren/work/RemoteControl/fonts/truetype

HAVE_FREETYPE_2_SUPPORT = Y
INCFT2LIB =
/home/hiren/work/ltib-m532xevb-20061117/rpm/BUILD/freetype-2.1.7/include
LIBFT2LIB =
/home/hiren/work/ltib-m532xevb-20061117/rpm/BUILD/freetype-2.1.7/objs/.l
ibs/libfreetype.a

Then I rebuilt microwindows. The compilation was successful.

Once I downloaded the file into my ColdFire board. My file was located
in "/tmp". I got the following error messages once I ran my application.
I did NOT see the FreeType fonts. Some small built-in fonts were shown
on the screen.

fnt_createfont: /tmp/times.ttf,25 not found
Nano-X-Freetype2: Freetype 2 error 1 trying to load font.
freetype2_createfont: /tmp/times.ttf,25 not found

Then I copied "times.ttf" to "/tmp". I got the following error message
once I ran my application. But I saw the big fonts of FreeType. It's
working!!!

fnt_createfont: /tmp/times.ttf,25 not found

In my application, I call the following function to create the font:

font_times = GrCreateFont((GR_CHAR *)"/tmp/times.ttf", 25, NULL);

Any idea about this issue? Or I don't need to care about it since it's
working? Do I need to copy "times.ttf" to the file system on my uClinux
board?

Thanks and Regards,

Allen Yang




-----Original Message-----
From: Thomas Malkus ####@####.#### 
Sent: Sunday, July 01, 2007 12:16 PM
To: ####@####.####
Subject: AW: [nanogui] how to cross compile FreeType font freetype1.3.1

Hi,

> Right now I am trying to add freetype font into my application so
that I
> can use different size of fonts. I downloaded FreeType library 1.3.1
> from microwindows.org. However, I could not figure out how to cross
> compile this library. It seems that the configration file is
> complicated.

> Any one here made it work? Would you please give me a direction?

Yes, with a ARM9 (AT91RM9200) but not with freetype 1.3.1. 
I had much trouble with freetype and nano-X, too. Now it is ok. 
I use microwindows 0.91 (or CVS source) and freetype 2.0.9 (you 
must search with Google for freetype-2.0.9.tar.gz) 

For compiling freetype2 define the exports for your toolchain.

Example:

export CC=arm-linux-3.4.2-gcc
export CXX=arm-linux-3.4.2-g++
export CPP=arm-linux-3.4.2-cpp
export AR=arm-linux-3.4.2-ar
export RANLIB=arm-linux-3.4.2-ranlib
export STRIP=arm-linux-3.4.2-strip

Change to the freetype-2.0.9 directory and use (with the option
for your processor architecture.

./configure --host=arm-linux --enable-static
make

After build of freetype2 change the config of microwindows:

FREETYPE_FONT_DIR=$(YOURPATH)/fonts/truetype

HAVE_FREETYPE_2_SUPPORT = Y
INCFT2LIB = $(YOURPATH)/freetype-2.0.9/include
LIBFT2LIB = $(YOURPATH)/freetype-2.0.9/objs/.libs/libfreetype.a

and do a rebuild on microwindows.

You could also use MWFONTDIR as path to the font directory.

Regards, Tom




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






The information contained in this email and attachments to this email are the proprietary and confidential property 
of Nucomm, Inc.  The information is provided in strict confidence and shall not be reproduced, copied, or
used (partially or wholly) in any manner without prior, express written authorization of Nucomm, Inc.


Previous by date: 3 Jul 2007 17:37:48 +0100 Re: Interfacing problem: How do I connect my touchscreen driver to nano-X?, Laine Walker-Avina
Next by date: 3 Jul 2007 17:37:48 +0100 Re: how to cross compile FreeType font freetype1.3.1, Thomas Malkus
Previous in thread: 3 Jul 2007 17:37:48 +0100 Re: how to cross compile FreeType font freetype1.3.1, Thomas Malkus
Next in thread: 3 Jul 2007 17:37:48 +0100 Re: how to cross compile FreeType font freetype1.3.1, Thomas Malkus


Powered by ezmlm-browse 0.20.