提交 8228828e 编写于 作者: B Behdad Esfahbod 提交者: Behdad Esfahbod

Handle GSUB Lookup type 8, and ReverseChainContextualSubst table. (bug

2006-01-30  Behdad Esfahbod  <behdad@gnome.org>

        * pango/opentype/ftxgsub.c: Handle GSUB Lookup type 8,
        and ReverseChainContextualSubst table.  (bug #149696,
        patch from Aamir Wali)
上级 e040f681
此差异已折叠。
......@@ -32,14 +32,14 @@ extern "C" {
/* Lookup types for glyph substitution */
#define GSUB_LOOKUP_SINGLE 1
#define GSUB_LOOKUP_MULTIPLE 2
#define GSUB_LOOKUP_ALTERNATE 3
#define GSUB_LOOKUP_LIGATURE 4
#define GSUB_LOOKUP_CONTEXT 5
#define GSUB_LOOKUP_CHAIN 6
#define GSUB_LOOKUP_EXTENSION 7
#define GSUB_LOOKUP_SINGLE 1
#define GSUB_LOOKUP_MULTIPLE 2
#define GSUB_LOOKUP_ALTERNATE 3
#define GSUB_LOOKUP_LIGATURE 4
#define GSUB_LOOKUP_CONTEXT 5
#define GSUB_LOOKUP_CHAIN 6
#define GSUB_LOOKUP_EXTENSION 7
#define GSUB_LOOKUP_REVERSE_CHAIN 8
/* Use this if a feature applies to all glyphs */
......@@ -467,14 +467,33 @@ extern "C" {
typedef struct TTO_ChainContextSubst_ TTO_ChainContextSubst;
/* LookupType 8 */
struct TTO_ReverseChainContextSubst_
{
FT_UShort SubstFormat; /* always 1 */
TTO_Coverage Coverage; /* coverage table for input glyphs */
FT_UShort BacktrackGlyphCount; /* number of backtrack glyphs */
TTO_Coverage* BacktrackCoverage; /* array of backtrack Coverage
tables */
FT_UShort LookaheadGlyphCount; /* number of lookahead glyphs */
TTO_Coverage* LookaheadCoverage; /* array of lookahead Coverage
tables */
FT_UShort GlyphCount; /* number of Glyph IDs */
FT_UShort* Substitute; /* array of substitute Glyph ID */
};
typedef struct TTO_ReverseChainContextSubst_ TTO_ReverseChainContextSubst;
union TTO_GSUB_SubTable_
{
TTO_SingleSubst single;
TTO_MultipleSubst multiple;
TTO_AlternateSubst alternate;
TTO_LigatureSubst ligature;
TTO_ContextSubst context;
TTO_ChainContextSubst chain;
TTO_SingleSubst single;
TTO_MultipleSubst multiple;
TTO_AlternateSubst alternate;
TTO_LigatureSubst ligature;
TTO_ContextSubst context;
TTO_ChainContextSubst chain;
TTO_ReverseChainContextSubst reverse;
};
typedef union TTO_GSUB_SubTable_ TTO_GSUB_SubTable;
......
......@@ -469,6 +469,9 @@
case GSUB_LOOKUP_CHAIN:
return Load_ChainContextSubst( &st->st.gsub.chain, stream );
case GSUB_LOOKUP_REVERSE_CHAIN:
return Load_ReverseChainContextSubst( &st->st.gsub.reverse, stream );
default:
return TTO_Err_Invalid_GSUB_SubTable_Format;
......@@ -536,6 +539,10 @@
Free_ContextSubst( &st->st.gsub.context, memory );
break;
case GSUB_LOOKUP_REVERSE_CHAIN:
Free_ReverseChainContextSubst( &st->st.gsub.reverse, memory );
break;
case GSUB_LOOKUP_CHAIN:
Free_ChainContextSubst( &st->st.gsub.chain, memory );
break;
......
......@@ -74,6 +74,8 @@ extern "C" {
FT_Stream input );
FT_Error Load_ChainContextSubst( TTO_ChainContextSubst* ccs,
FT_Stream input );
FT_Error Load_ReverseChainContextSubst( TTO_ReverseChainContextSubst* rccs,
FT_Stream input );
void Free_SingleSubst( TTO_SingleSubst* ss,
FT_Memory memory );
......@@ -87,7 +89,8 @@ extern "C" {
FT_Memory memory );
void Free_ChainContextSubst( TTO_ChainContextSubst* ccs,
FT_Memory memory );
void Free_ReverseChainContextSubst( TTO_ReverseChainContextSubst* rccs,
FT_Memory memory );
/* functions from ftxgpos.c */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册