freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] API to tell if TrueType hinter compiled in?


From: Antoine Leca
Subject: Re: [Freetype] API to tell if TrueType hinter compiled in?
Date: Thu, 13 Dec 2001 22:17:44 +0100

Brian Stell wrote:
> 
> Is there an API to tell if TrueType hinter was compiled in?

No (or not yet).

Other elements that may be of interest include:
- version numbers, as signaled by Brian;
- gray-scaling support;
- autohinting;
- max number of loadable extensions (already available at runtime?);
- threading-safety;
- cache support (and where);
- DLL/so/static build (is it possible?);
- with limited support for big/CJKV fonts (of concern for 16-bit
    implementations only);
and all the options listed in freetype/config/ftoption.h:
- convenience functions;
- alternate glyph image support;
- psnames;
- Adobe AGL support;
- embeeded bitmaps support;
- access to sfnt 'name' table;
- T1 hinter;
- T1 AFM support;
- MM support;
etc. (more?)

The available schemes range from:

  FT_EXPORT( FT_Error )
  FT_Get_Capabilities( FT_some_fixed_structure * );

which is not very extensible, includes

  FT_EXPORT( FT_Error )
  FT_Get_Capabilities( unsigned  minimum_version_requested,
                       FT_some_structure_depending_of_version * );

which is better but not perfect, or

  FT_EXPORT( FT_Error )
  FT_Get_Capabilities( unsigned  index,
                       void * );

  /* the infos returned in the structure depends of the info requested */

which is quite heavy (big switch sparsely used) and deserves a
bad perfs/price ratio, to

  FT_EXPORT( FT_Error )
  FT_Get_Capabilities( unsigned  size_struct_passed,
                       void *infos );

  /* the library fills only the `size_struct_passed' first bytes */

  /* User code uses a struct defined statically depending of the .h
     used hence the version of library the source were compiled for. 
     Call sequence is

     struct FT_Capabilities caps;

     //...

     if( FT_Get_Capabilities( sizeof caps, caps ) ...

   */
     

OTOH, if we are on the way to extend the API, I have another
suggestion: with the TrueType rasterizer, we always masquerade
as the Windows 3.1 engine (in GETVERSION[]); since the newer
engines have additional features like gray-scaling that some fonts
may decide to use/don't, it appears to me it would be useful to
return a customizable (by user app) value to GETVERSION[].
Perhaps there are similar "magic" values in the other modules, too
(size of cache comes to mind).


Antoine




reply via email to

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