NW   NE
 

Sharp Zaurus Developer Information

Corrections and Comments: Spencer Huang
 
SW   SE
NW   NE
 
Howtos

Upgrading The ROM

Connectivity
Wireless 802.11b

Linux Connectivity
Generic (USB)
Debian (USB)
Red Hat (USB)
Suse (USB)
Mandrake (USB)
Generic (PPP USB)
Generic (PPP Serial)

Windows Connectivity
Win2K (Serial)
Win98se (Serial)
WinMe Over (Serial)
WinNTSP6 (Serial)
WinXP Over (Serial)

Developing
Compiler Setup
Compiling the Kernel
Special Considerations
Checklist
System Layout
Application Help Files
IPKG Howto
Buzzer Howto
Led Howto
IrDa Howto
Audio Howto
Fullscreen Howto
Resume Event
Keys
Turning off the screen

Syncing
Linux
Win2K
Wireless

Other
Wireless Comparison
The Z Boot Process
Ipv6 Setup
Servers Setup
SD And CF FAQ
Setting Up A Feed
Converting TTF fonts
Building a ROM
MPEG Encoding

Downloads
ZaurusZone Feed
Links
 
SW   SE
NW   NE
  Converting TTF fonts into QPF

Created by Latchesar Ionkov <lucho@ionkov.net>

I. How to build makeqpf that works

I found three problems with makeqpf as it comes with qt-embedded.

1. qt-2.3.3-ft.patch
   This patch fixes a bug in qt-embedded. See the documentation of FT_Glyph_To_Bitmap in freetype/include/freetype/ftglyph.h if you don't believe me :)

2. qt-2.3.3-transformed.patch
   The second patch makes Transformed display to work with qvfb instead of linuxfb. You need Transformed display to generate fonts (that are rotated on 270 degrees) for the Z. If you use linux framebuffer you don't need this patch.

3. qt-2.3.3-ch01fb.patch
   For some reason I get segmentation faults when I convert arial*.ttf and times*.ttf. The segfaults are deep in the freetype code and happen when it renders 0x1fb character (latin small letter a with ring above and acute). As I really don't need this character, I left the real fix to somebody with more knowledge about the freetype code, patching qt-embedded to not try to render this character.

When you build qt-embedded, make sure that qt is configured to support TTF fonts (no QT_NO_FREETYPE in the qconfig.h you use). "Build everything" is ok. The commands I use to build qt-embedded are:

       QTDIR=. export QTDIR
       echo yes | ./configure -depths 16,32 -static -debug -qvfb
       make sub-src
       make -C tools/makeqpf

The build will produce makeqpf executable in $QTDIR/tools/makeqpf. It is statically linked and doesn't need qte libraries (and it is big :).

If you don't want to build it and you are brave enough to run binaries downloaded from weird ftp sites, you can get precompiled binary from

        ftp://zaurus.ionkov.net/pub/makeqpf

II. How to convert TTF fonts.

   1. Make sure that you have Qtopia SDK installed. Set up QPEDIR, QTDIR and
      LD_LIBRARY_PATH variables as described in "Qtopia - Getting Started"
      document.

   2. Put the TTF fonts you want to convert in $QPEDIR/lib/fonts

   3. Add the font descriptions in $QPEDIR/lib/fonts/fontdir
      See http://doc.trolltech.com/2.3/fonts-qws.html for fontdir syntax

      If you want to use non-latin characters, don't forget the 'u' option in
      the font description.

   4. Run qvfb

   5. To get fonts for the Z, run

        makeqpf -display Transformed:Rot270 -A

      If you want to have the same fonts for the Qtopia SDK, run

        makeqpf -A

      The fonts *_t10.qpf are the ones that should be installed on the Z (the rotated ones).

I am not sure that this is the best (and the only) way to produce QPF fonts from TTF. If you know better one I'll be glad to hear it.
 
SW   SE

    This page was last updated: Wednesday, 09-Apr-2003 04:57:24 PDT