Add GPOS_LOOKUP_EXTENSION, GSUB_LOOKUP_EXTENSION, which allow lookup

Fri Jul 25 22:59:13 2003  Owen Taylor  <otaylor@redhat.com>

        * pango/opentype/ftx{gpos,gsub}.h pango/opentype/ftxgdef.c:
        Add GPOS_LOOKUP_EXTENSION, GSUB_LOOKUP_EXTENSION, which
        allow lookup information to be stored at 32-bit offets
        via a double indirection. (From FreeType, Werner Lemberg,
        2001-08-08)
This commit is contained in:
Owen Taylor 2003-07-26 03:03:40 +00:00 committed by Owen Taylor
parent 375781c454
commit 6f74f18b77
3 changed files with 29 additions and 8 deletions

View File

@ -40,6 +40,7 @@ extern "C" {
#define GPOS_LOOKUP_MARKMARK 6
#define GPOS_LOOKUP_CONTEXT 7
#define GPOS_LOOKUP_CHAIN 8
#define GPOS_LOOKUP_EXTENSION 9
/* A pointer to a function which loads a glyph. Its parameters are

View File

@ -38,6 +38,7 @@ extern "C" {
#define GSUB_LOOKUP_LIGATURE 4
#define GSUB_LOOKUP_CONTEXT 5
#define GSUB_LOOKUP_CHAIN 6
#define GSUB_LOOKUP_EXTENSION 7
/* Use this if a feature applies to all glyphs */

View File

@ -584,6 +584,8 @@
TTO_SubTable* st;
Bool is_extension = FALSE;
base_offset = FILE_Pos();
@ -603,6 +605,10 @@
st = l->SubTable;
if ( ( type == GSUB && l->LookupType == GSUB_LOOKUP_EXTENSION ) ||
( type == GPOS && l->LookupType == GPOS_LOOKUP_EXTENSION ) )
is_extension = TRUE;
for ( n = 0; n < count; n++ )
{
if ( ACCESS_Frame( 2L ) )
@ -613,6 +619,19 @@
FORGET_Frame();
cur_offset = FILE_Pos();
if ( is_extension )
{
if ( FILE_Seek( new_offset ) || ACCESS_Frame( 8L ) )
goto Fail;
(void)GET_UShort(); /* format should be 1 */
l->LookupType = GET_UShort();
new_offset = GET_ULong() + base_offset;
FORGET_Frame();
}
if ( FILE_Seek( new_offset ) ||
( error = Load_SubTable( &st[n], stream,
type, l->LookupType ) ) != TT_Err_Ok )