freetype-devel
[Top][All Lists]
Advanced

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

[Devel] inclusion scheme updated


From: David Turner
Subject: [Devel] inclusion scheme updated
Date: Mon, 04 Dec 2000 16:51:56 +0100

Hello,

  Yet another, refined, inclusion scheme has been commited
  to the FT2 sources today. Here's a short summary:

   A - the public header file <ft2build.h> is used, by
       default, as a build & setup configuration file and
       must be included **before anything else**, either in
       an application or within FreeType

   B - public header files must now be included through
       the use of a macro. For example:

            #include <ft2build.h>
            #include FT_FREETYPE_H
            #include FT_GLYPH_H

       the list of macros is in "include/freetype/config/ft2build.h",
       which is the default build & setup file. They should be documented
       independently in the future (volunteers ??)


   C - the source directory tree hasn't changed, which
       means that we still use "include/freetype/..." to store
       all installable header files and compile the library.

       however, there is a default "include/ft2build.h" used
       to build the library, and optionally for "default"
       installs. Its content is simply something like:

           #ifndef __FT2_BUILD_GENERIC_H__
           #define __FT2_BUILD_GENERIC_H__

           /* load generic build & setup configuration */
           #include <freetype/config/ft2build.h>

           #endif /* __FT2_BUILD_GENERIC_H__ */


    D - On Unix, the header files are still installed in
        "freetype2/freetype". However, the file "builds/unix/ft2unix.h"
        is copied as the default <ft2build.h>, its content being:

           #ifndef  __FT2_BUILD_UNIX_H__
           #define  __FT2_BUILD_UNIX_H__

           #define  FT2_ROOT  freetype2/freetype
           #include <freetype2/freetype/config/ft2build.h>

           #endif /* __FT2_BUILD_UNIX_H__ */

All of this means that client applications are now _strongly_ encouraged
to use <ft2build.h> + macros instead of <freetype/...> for header file
inclusions, even if they can still compile presently with the old
scheme. The new scheme is more portable and more flexible regarding
configuration & setup..

In a near future, we're going to change the default Unix install
to the simpler, "freetype2", and change the content of "ft2unix.h"
to:

           #ifndef  __FT2_BUILD_UNIX_H__
           #define  __FT2_BUILD_UNIX_H__

           #define  FT2_ROOT  freetype2
           #include <freetype2/config/ft2build.h>
           #endif /* __FT2_BUILD_UNIX_H__ */

This should not break applications if they use the new scheme..

I'm still waiting for suggestions of improvements. If everything
is well as it currently is, I propose to make a 2.0.2 release
as soon as possible, and start modifying every documentation
we have on the subject (tutorial + web pages), as well as
the demonstration programs (they'll be modified after 2.0.2)

Comments and testing are highly welcomed :-)

- David



reply via email to

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