next up previous contents index
Next: Problems with libpng Up: Compiling Previous: Installing Xbae   Contents   Index


Problems with Freetype

Freetype consists of several pieces, which must all be in the correct location before tnimage will compile with freetype support:

  1. Freetype include files (Xft.h, freetype.h, etc.)
  2. Freetype libraries (libXft)
  3. The freetype or truetype fonts

Only freetype version 2.x is fully functional.

In addition, your X server must have support for the RENDER extension.

If you get the message:

     Xlib : extension RENDER missing on display ":0.0"
this means your X server is too old or is missing the RENDER extension needed to render anti-aliased fonts. You need to either upgrade XFree86 or recompile tnimage without font aliasing using the -disable-xft option.

If you get the message

   In file included from xmtnimage.h:91,
                 from xmtnimage.cc:9:
   /usr/X11R6/include/X11/Xft/Xft.h:52: error: syntax error before `;' token
   /usr/X11R6/include/X11/Xft/Xft.h:86: error: 'FT_UInt' is used as a type, but is 
      not defined as a type.
   /usr/X11R6/include/X11/Xft/Xft.h:93: error: 'FT_UInt' is used as a type, but is 
      not defined as a type.

this means there is something wrong with your Xft or Freetype installation. libXft is available from http://pdx.freedesktop.org/xlibs/release/ or fontconfig.org . Freetype is available from http://freetype.org/. To get freetype to work, do the following:

  1. Download and install the latest version of libXft and Freetype. For both programs, this includes the standard three steps:
      tar -xzvf <filename>
      cd <directory>
      ./configure
      make 
      make install
    

    LibXft will install itself in /usr/local. Freetype installs in /usr/include/freetype2. Before they will work, it is sometimes necessary to move the files to the correct locations. However, this should not be necessary in most cases.

    A similar error sometimes occurs during compilation, like this:

      /usr/X11R6/include/X11/Xft/Xft.h:59: error: 'FT_Library' does not name a type
      /usr/X11R6/include/X11/Xft/Xft.h:93: error: 'FT_UInt' does not name a type
    

    type the command

      freetype-config --cflags
    

    This will print the directory where the freetype include files are supposed to be. For example, it may print

      -I/usr/include/freetype2
    

    As root, change to this directory and type ls -l. There should be directories named cache, config, freetype, and internal, along with about 37 include files (*.h). In particular, there should be a file named freetype.h that is about 201002 bytes in size. If your freetype.h is only 44044 bytes, it is from freetype version 1 and you need to install freetype version 2.

  2. Sometimes old versions of freetype may cause problems. For example, freetype version 1 include files might be mixed in with freetype version two files. If this happens, try renaming the freetype directory to freetype.bak and reinstalling freetype.


next up previous contents index
Next: Problems with libpng Up: Compiling Previous: Installing Xbae   Contents   Index
root 2006-11-13