freetype-devel
[Top][All Lists]
Advanced

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

Re: GPOS support available!


From: David Turner
Subject: Re: GPOS support available!
Date: Fri, 28 Jan 2000 16:34:08 +0100

Hi Werner,

> I think I have to change the API slightly to support vertical
> connections also.  So please test the stuff and make suggestions how
> to improve the interface!  I don't know any user of GSUB/GPOS stuff...
> 
All right, I have read the OTL code extensively, as well as the latest
version of the specification. I would like to thank you, because you
obviously contributed a significant amount of work !

I'm very interested in porting this code to FreeType 2 now (I'll
probably be the "volunteer" you're talking about in the code
comments ;-), but I'd like to add my $0.02 here.

In order to make things easier, what would you think about making
the OTL table support independent of the rest of the FreeType code !

I could imagine an API where you would have something like:

 - A root OTL object, that would describe the whole
   GSUB/GPOS/etc.. tables to client applications.
   This object would be independent from a given TT_Face
   structure.

   it would be initialised like this:
     o load the GSUB/GPOS/GDEF/etc.. tables in various memory blocks
     o provide pointers to these blocks to an initialisation routine
       who would parse them to build the relevant OTL sub-objects.

     example code:

     // ------ layout object creation -------
     //
         OTL_Layout  layout;

         // to create a new OTL_Layout from a given TT_Face
         //
         error = OTL_New_Layout_From_Face( face, &layout );
         if (error) { .... }

      or

         // to create a new OTL_Layout from the tables in memory
         // the "engine" parameter is used to reach the memory allocator
         //
         error = OTL_New_Layout_From_Memory( engine, &layout,
                   gdef_base, gdef_len,
                   gpos_base, gpos_len,
                   gsub_base, gsub_len,
                   base_base, base_len,
                   jstf_base, jstf_len );


 - some high-level functions that would act as "methods" on the
   root OTL object, used to perform some various typographic operations
   (really substitution/positionning :-)

The idea is twofold:

 - you don't need to have an opened TT_Face to use the layout. believe
   me, this is very useful for a text-rendering library where you try
   to cache agressively the data that you must frequently use (like
   metrics and glyph images), and where you normally limit the number
   of opened TT_Face.

 - it would be independent of FT 1.x or FT 2, thus portable across
   these two designs..

So, what's your opinion on the subject ??

- David



reply via email to

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