freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Update of freetype 1 : FT_EXPORT_DEF & co


From: Antoine Leca
Subject: [Devel] Update of freetype 1 : FT_EXPORT_DEF & co
Date: Sat, 19 Jan 2002 01:30:41 +0100

Hi all,

I have committed a big number of file changes on Freetype 1.x

Besides some typo corrections and small changes (harmless, I hope),
the big change is the use of a new set of macros to "decorate"
the function, much like we do with Freetype 2.

As a result, the "old" macros EXPORT_DEF, EXPORT_FUNC, LOCAL_DEF
and LOCAL_FUNC are replaced with (respectively) FT_EXPORT_DEF,
FT_EXPORT_FUNC, FT_INTERNAL_DEF and FT_INTERNAL_FUNC.
The main difference is that the new one is a macro function
that takes the name of the declared/defined function as argument
(instead of being a simple macro that is prepended to the name.)
This allows the macro to insert some specifiers (like the in-famous
_far, _export, etc.) *after* the name, which is required by some
compilers.

I hope I did explain all of this stuff correctly in ttconfig.h.
Here is a short resume I wrote in INSTALL:

      Each  FreeType API  function is  declared with  the help  of a
      special macro named FT_EXPORT_DEF.   For example,  here is the
      declaration of the  function `FT_Init_FreeType', as written in
      `freetype.h':

        FT_EXPORT_DEF( TT_Error )
        TT_Init_FreeType( TT_Engine*  engine );

      If   the  configuration   file   `ft_conf.h'  doesn't   define
      FT_EXPORT_DEF, it is automatically set to `extern' by default.

      In order to build FreeType as  a DLL, one might need to define
      FT_EXPORT_DEF in its  `ft_conf.h' to the keywords tagging  the
      function  as a  DLL  entry point.   This  keyword varies  with
      compilers    and   platforms;    examples    are   `__system',
      `__dllentry', `_FAR _PASCAL _export' after the type name, etc.
      Note that FT_EXPORT_DEF is a (macro) function, taking the type
      name as argument, in order to allow the last example.


Another change is that the demo program for i18n, fterror, can now
take an optional argument, which should be a error number (as may
returned by a Freetype call while debugging...); it returns the
error message associated to this error code, obviously shown in
the current locale.

I hope you will be able to test these changes, and report to me
any problem you may run into (please!) I am particularly interested
in hearing from the people that did personalize EXPORT_DEF & co,
in order to validate the upward compatibility of the new scheme.


Regards,

Antoine



reply via email to

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