freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Configuring FT2 for TrueType only?


From: David Turner
Subject: Re: Configuring FT2 for TrueType only?
Date: Thu, 17 Feb 2000 10:00:37 +0100

Hi Jack,

> Hi David/Werner,
> 
> I've started playing with the new FreeType-2 beta, and was wondering if there 
> are any switches in the "make" or config.h header files that allow a library 
> to be built with TrueType support only (I've looked but haven't seen anything 
> obvious).  I don't need Type1, OpenType or sfnt support right now, and would 
> prefer to keep my library build as simple and as small possible.
>

OK, Here's basically how to do it:

  - change the list of modules statically linked to the library. The list is in 
the
    file "freetype2/config/<system>/ftmodule.h". You can easily modify it by 
hand
    to only keep the "sfnt" and "truetype" modules. "sfnt" is required for 
FreeType.

  - if you don't need embedded bitmaps, undefine the configuration macro
    TT_CONFIG_OPTION_EMBEDDED_BITMAPS in "src/sfnt/sfconfig.h". Forget about
    the same macro in "src/truetype/ttconfig.h", it is now obsolete and should
    be removed shortly..

  - if you don't need glyph postscript names, undefine the configuration macro
    TT_CONFIG_OPTION_POSTSCRIPT_NAMES in "src/sfnt/sfconfig.h". Forget also
    about the same macro in "src/truetype/ttconfig.h"

  - if you *want* glyph postscript names, you should also undefine the 
configuration
    macro FT_CONFIG_OPTION_POSTSCRIPT_NAMES in "config/<system>/ftoption.h". 
This is
    because, by default, the "sfnt" module used the "psnames" module to retrieve
    Macintosh glyph names. With this macro undefined, it provides its own glyph 
name
    table without relying on "psnames".

    Note that FT_CONFIG_OPTION_POSTSCRIPT_NAMES isn't necessarily listed in all
    "config/<system>/ftoption.h" files (I believe that only the Win32, and maybe
    Unix ones have it defined), but this isn't a problem

  - If you do not want to compile the bytecode interpreter, simply undefine the
    macro TT_CONFIG_OPTION_BYTECODE_INTERPRETER in "src/truetype/ttconfig.h"
    The "truetype" module will drop to about 8 Kb when compiled.

  - Now rebuild the library. Don't bother about the "type1.o", "psnames.o" and 
even
    "type1z.o", as they will not be linked to the library code. If you really 
do not
    want them in your build, simply do one of the following :

    - remove the directories "src/psnames", "src/type1" and "src/type1z"

    - or simply rename the files "rules.mk" and "module.mk" in them to something
      different (like "rules.mk.not" and "module.mk.not" for example).

    Then, these modules will not be compiled during your build.


The final version of FT 2 will probably have higher-level configuration macros
in "ftoption.h" to build what you're asking for. Also, most configuration macros
will be move upwards to "ftoption.h" instead of residing in 
"src/<module>/xxconfig.h".
For now, you'll still need a little bit of configuration, sorry..

Hope this helps,

- David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]