* src/sfnt/ftbitmap.c, src/truetype/ttgload.c, src/sfnt/ttcmap.c:
removing compiler warnings (Visual C++ /W4) * Jamfile, src/otvalid/{otvcommn.h,otvgdef.c,otvgpos.c,otvgsub.c, otvjstf.c}: modified the code to use a different pre-processor trick to implement the OTV_NEST1, OTV_NEST2 and OTV_NEST3 macros. The code now compiles neatly with Visual C++. The 'otvalid' module has been put in the Jamfile build again.
This commit is contained in:
parent
7b33dca43c
commit
c562162834
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2005-06-30 David Turner <david@freetype.org>
|
||||||
|
|
||||||
|
* src/sfnt/ftbitmap.c, src/truetype/ttgload.c, src/sfnt/ttcmap.c:
|
||||||
|
removing compiler warnings (Visual C++ /W4)
|
||||||
|
|
||||||
|
* Jamfile, src/otvalid/{otvcommn.h,otvgdef.c,otvgpos.c,otvgsub.c,
|
||||||
|
otvjstf.c}: modified the code to use a different pre-processor trick
|
||||||
|
to implement the OTV_NEST1, OTV_NEST2 and OTV_NEST3 macros. The code
|
||||||
|
now compiles neatly with Visual C++. The 'otvalid' module has been
|
||||||
|
put in the Jamfile build again.
|
||||||
|
|
||||||
2005-06-20 Chia I Wu <b90201047@ntu.edu.tw>
|
2005-06-20 Chia I Wu <b90201047@ntu.edu.tw>
|
||||||
|
|
||||||
* include/freetype/internal/ftobjs.h, src/base/ftobjs.c: New function
|
* include/freetype/internal/ftobjs.h, src/base/ftobjs.c: New function
|
||||||
|
|
2
Jamfile
2
Jamfile
|
@ -78,7 +78,7 @@ FT2_COMPONENTS ?= autofit # auto-fitter
|
||||||
cid # PostScript CID-keyed font driver
|
cid # PostScript CID-keyed font driver
|
||||||
gzip # support for gzip-compressed files
|
gzip # support for gzip-compressed files
|
||||||
lzw # support for LZW-compressed files
|
lzw # support for LZW-compressed files
|
||||||
#otvalid # validation of OpenType tables
|
otvalid # validation of OpenType tables
|
||||||
pcf # PCF font driver
|
pcf # PCF font driver
|
||||||
pfr # PFR/TrueDoc font driver
|
pfr # PFR/TrueDoc font driver
|
||||||
psaux # common PostScript routines module
|
psaux # common PostScript routines module
|
||||||
|
|
|
@ -310,12 +310,12 @@
|
||||||
{
|
{
|
||||||
if ( p[x] + p[x - i] > bitmap->num_grays - 1 )
|
if ( p[x] + p[x - i] > bitmap->num_grays - 1 )
|
||||||
{
|
{
|
||||||
p[x] = bitmap->num_grays - 1;
|
p[x] = (unsigned char)(bitmap->num_grays - 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
p[x] += p[x - i];
|
p[x] = (unsigned char)(p[x] + p[x-i]);
|
||||||
if ( p[x] == bitmap->num_grays - 1 )
|
if ( p[x] == bitmap->num_grays - 1 )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,39 +109,42 @@ FT_BEGIN_HEADER
|
||||||
FT_END_STMNT
|
FT_END_STMNT
|
||||||
|
|
||||||
|
|
||||||
|
#define OTV_NAME_(x) #x
|
||||||
|
#define OTV_NAME(x) OTV_NAME_(x)
|
||||||
|
|
||||||
|
#define OTV_FUNC_(x) x##Func
|
||||||
|
#define OTV_FUNC(x) OTV_FUNC_(x)
|
||||||
|
|
||||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||||
|
|
||||||
/* use preprocessor's argument prescan to expand one argument into two */
|
/* use preprocessor's argument prescan to expand one argument into two */
|
||||||
#define OTV_NEST1( x ) OTV_NEST1_( x )
|
#define OTV_NEST1( x ) \
|
||||||
#define OTV_NEST1_( func0, name0 ) \
|
|
||||||
FT_BEGIN_STMNT \
|
FT_BEGIN_STMNT \
|
||||||
valid->nesting_level = 0; \
|
valid->nesting_level = 0; \
|
||||||
valid->func[0] = func0; \
|
valid->func[0] = OTV_FUNC(x); \
|
||||||
valid->debug_function_name[0] = name0; \
|
valid->debug_function_name[0] = OTV_NAME(x); \
|
||||||
FT_END_STMNT
|
FT_END_STMNT
|
||||||
|
|
||||||
/* use preprocessor's argument prescan to expand two arguments into four */
|
/* use preprocessor's argument prescan to expand two arguments into four */
|
||||||
#define OTV_NEST2( x, y ) OTV_NEST2_( x, y )
|
#define OTV_NEST2( x, y ) \
|
||||||
#define OTV_NEST2_( func0, name0, func1, name1 ) \
|
|
||||||
FT_BEGIN_STMNT \
|
FT_BEGIN_STMNT \
|
||||||
valid->nesting_level = 0; \
|
valid->nesting_level = 0; \
|
||||||
valid->func[0] = func0; \
|
valid->func[0] = OTV_FUNC(x); \
|
||||||
valid->func[1] = func1; \
|
valid->func[1] = OTV_FUNC(y); \
|
||||||
valid->debug_function_name[0] = name0; \
|
valid->debug_function_name[0] = OTV_NAME(x); \
|
||||||
valid->debug_function_name[1] = name1; \
|
valid->debug_function_name[1] = OTV_NAME(y); \
|
||||||
FT_END_STMNT
|
FT_END_STMNT
|
||||||
|
|
||||||
/* use preprocessor's argument prescan to expand three arguments into six */
|
/* use preprocessor's argument prescan to expand three arguments into six */
|
||||||
#define OTV_NEST3( x, y, z ) OTV_NEST3_( x, y, z )
|
#define OTV_NEST3( x, y, z ) \
|
||||||
#define OTV_NEST3_( func0, name0, func1, name1, func2, name2 ) \
|
|
||||||
FT_BEGIN_STMNT \
|
FT_BEGIN_STMNT \
|
||||||
valid->nesting_level = 0; \
|
valid->nesting_level = 0; \
|
||||||
valid->func[0] = func0; \
|
valid->func[0] = OTV_FUNC(x); \
|
||||||
valid->func[1] = func1; \
|
valid->func[1] = OTV_FUNC(y); \
|
||||||
valid->func[2] = func2; \
|
valid->func[2] = OTV_FUNC(z); \
|
||||||
valid->debug_function_name[0] = name0; \
|
valid->debug_function_name[0] = OTV_NAME(x); \
|
||||||
valid->debug_function_name[1] = name1; \
|
valid->debug_function_name[1] = OTV_NAME(y); \
|
||||||
valid->debug_function_name[2] = name2; \
|
valid->debug_function_name[2] = OTV_NAME(z); \
|
||||||
FT_END_STMNT
|
FT_END_STMNT
|
||||||
|
|
||||||
#define OTV_INIT valid->debug_indent = 0
|
#define OTV_INIT valid->debug_indent = 0
|
||||||
|
@ -172,30 +175,27 @@ FT_BEGIN_HEADER
|
||||||
#else /* !FT_DEBUG_LEVEL_TRACE */
|
#else /* !FT_DEBUG_LEVEL_TRACE */
|
||||||
|
|
||||||
/* use preprocessor's argument prescan to expand one argument into two */
|
/* use preprocessor's argument prescan to expand one argument into two */
|
||||||
#define OTV_NEST1( x ) OTV_NEST1_( x )
|
#define OTV_NEST1( x ) \
|
||||||
#define OTV_NEST1_( func0, name0 ) \
|
|
||||||
FT_BEGIN_STMNT \
|
FT_BEGIN_STMNT \
|
||||||
valid->nesting_level = 0; \
|
valid->nesting_level = 0; \
|
||||||
valid->func[0] = func0; \
|
valid->func[0] = OTV_FUNC(x); \
|
||||||
FT_END_STMNT
|
FT_END_STMNT
|
||||||
|
|
||||||
/* use preprocessor's argument prescan to expand two arguments into four */
|
/* use preprocessor's argument prescan to expand two arguments into four */
|
||||||
#define OTV_NEST2( x, y ) OTV_NEST2_( x, y )
|
#define OTV_NEST2( x, y ) \
|
||||||
#define OTV_NEST2_( func0, name0, func1, name1 ) \
|
|
||||||
FT_BEGIN_STMNT \
|
FT_BEGIN_STMNT \
|
||||||
valid->nesting_level = 0; \
|
valid->nesting_level = 0; \
|
||||||
valid->func[0] = func0; \
|
valid->func[0] = OTV_FUNC(x); \
|
||||||
valid->func[1] = func1; \
|
valid->func[1] = OTV_FUNC(y); \
|
||||||
FT_END_STMNT
|
FT_END_STMNT
|
||||||
|
|
||||||
/* use preprocessor's argument prescan to expand three arguments into six */
|
/* use preprocessor's argument prescan to expand three arguments into six */
|
||||||
#define OTV_NEST3( x, y, z ) OTV_NEST3_( x, y, z )
|
#define OTV_NEST3( x, y, z ) \
|
||||||
#define OTV_NEST3_( func0, name0, func1, name1, func2, name2 ) \
|
|
||||||
FT_BEGIN_STMNT \
|
FT_BEGIN_STMNT \
|
||||||
valid->nesting_level = 0; \
|
valid->nesting_level = 0; \
|
||||||
valid->func[0] = func0; \
|
valid->func[0] = OTV_FUNC(x); \
|
||||||
valid->func[1] = func1; \
|
valid->func[1] = OTV_FUNC(y); \
|
||||||
valid->func[2] = func2; \
|
valid->func[2] = OTV_FUNC(z); \
|
||||||
FT_END_STMNT
|
FT_END_STMNT
|
||||||
|
|
||||||
#define OTV_INIT do ; while ( 0 )
|
#define OTV_INIT do ; while ( 0 )
|
||||||
|
@ -338,6 +338,7 @@ FT_BEGIN_HEADER
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
#if 0
|
||||||
#define ChainPosClassSet otv_x_Ox, "ChainPosClassSet"
|
#define ChainPosClassSet otv_x_Ox, "ChainPosClassSet"
|
||||||
#define ChainPosRuleSet otv_x_Ox, "ChainPosRuleSet"
|
#define ChainPosRuleSet otv_x_Ox, "ChainPosRuleSet"
|
||||||
#define ChainSubClassSet otv_x_Ox, "ChainSubClassSet"
|
#define ChainSubClassSet otv_x_Ox, "ChainSubClassSet"
|
||||||
|
@ -351,11 +352,27 @@ FT_BEGIN_HEADER
|
||||||
#define PosRuleSet otv_x_Ox, "PosRuleSet"
|
#define PosRuleSet otv_x_Ox, "PosRuleSet"
|
||||||
#define SubClassSet otv_x_Ox, "SubClassSet"
|
#define SubClassSet otv_x_Ox, "SubClassSet"
|
||||||
#define SubRuleSet otv_x_Ox, "SubRuleSet"
|
#define SubRuleSet otv_x_Ox, "SubRuleSet"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ChainPosClassSetFunc otv_x_Ox
|
||||||
|
#define ChainPosRuleSetFunc otv_x_Ox
|
||||||
|
#define ChainSubClassSetFunc otv_x_Ox
|
||||||
|
#define ChainSubRuleSetFunc otv_x_Ox
|
||||||
|
#define JstfLangSysFunc otv_x_Ox
|
||||||
|
#define JstfMaxFunc otv_x_Ox
|
||||||
|
#define LigGlyphFunc otv_x_Ox
|
||||||
|
#define LigatureArrayFunc otv_x_Ox
|
||||||
|
#define LigatureSetFunc otv_x_Ox
|
||||||
|
#define PosClassSetFunc otv_x_Ox
|
||||||
|
#define PosRuleSetFunc otv_x_Ox
|
||||||
|
#define SubClassSetFunc otv_x_Ox
|
||||||
|
#define SubRuleSetFunc otv_x_Ox
|
||||||
|
|
||||||
FT_LOCAL( void )
|
FT_LOCAL( void )
|
||||||
otv_x_Ox ( FT_Bytes table,
|
otv_x_Ox ( FT_Bytes table,
|
||||||
OTV_Validator valid );
|
OTV_Validator valid );
|
||||||
|
|
||||||
|
#if 0
|
||||||
#define AlternateSubstFormat1 otv_u_C_x_Ox, "AlternateSubstFormat1"
|
#define AlternateSubstFormat1 otv_u_C_x_Ox, "AlternateSubstFormat1"
|
||||||
#define ChainContextPosFormat1 otv_u_C_x_Ox, "ChainContextPosFormat1"
|
#define ChainContextPosFormat1 otv_u_C_x_Ox, "ChainContextPosFormat1"
|
||||||
#define ChainContextSubstFormat1 otv_u_C_x_Ox, "ChainContextSubstFormat1"
|
#define ChainContextSubstFormat1 otv_u_C_x_Ox, "ChainContextSubstFormat1"
|
||||||
|
@ -363,63 +380,115 @@ FT_BEGIN_HEADER
|
||||||
#define ContextSubstFormat1 otv_u_C_x_Ox, "ContextSubstFormat1"
|
#define ContextSubstFormat1 otv_u_C_x_Ox, "ContextSubstFormat1"
|
||||||
#define LigatureSubstFormat1 otv_u_C_x_Ox, "LigatureSubstFormat1"
|
#define LigatureSubstFormat1 otv_u_C_x_Ox, "LigatureSubstFormat1"
|
||||||
#define MultipleSubstFormat1 otv_u_C_x_Ox, "MultipleSubstFormat1"
|
#define MultipleSubstFormat1 otv_u_C_x_Ox, "MultipleSubstFormat1"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define AlternateSubstFormat1Func otv_u_C_x_Ox
|
||||||
|
#define ChainContextPosFormat1Func otv_u_C_x_Ox
|
||||||
|
#define ChainContextSubstFormat1Func otv_u_C_x_Ox
|
||||||
|
#define ContextPosFormat1Func otv_u_C_x_Ox
|
||||||
|
#define ContextSubstFormat1Func otv_u_C_x_Ox
|
||||||
|
#define LigatureSubstFormat1Func otv_u_C_x_Ox
|
||||||
|
#define MultipleSubstFormat1Func otv_u_C_x_Ox
|
||||||
|
|
||||||
|
|
||||||
FT_LOCAL( void )
|
FT_LOCAL( void )
|
||||||
otv_u_C_x_Ox( FT_Bytes table,
|
otv_u_C_x_Ox( FT_Bytes table,
|
||||||
OTV_Validator valid );
|
OTV_Validator valid );
|
||||||
|
|
||||||
|
#if 0
|
||||||
#define AlternateSet otv_x_ux, "AlternateSet"
|
#define AlternateSet otv_x_ux, "AlternateSet"
|
||||||
#define AttachPoint otv_x_ux, "AttachPoint"
|
#define AttachPoint otv_x_ux, "AttachPoint"
|
||||||
#define ExtenderGlyph otv_x_ux, "ExtenderGlyph"
|
#define ExtenderGlyph otv_x_ux, "ExtenderGlyph"
|
||||||
#define JstfGPOSModList otv_x_ux, "JstfGPOSModList"
|
#define JstfGPOSModList otv_x_ux, "JstfGPOSModList"
|
||||||
#define JstfGSUBModList otv_x_ux, "JstfGSUBModList"
|
#define JstfGSUBModList otv_x_ux, "JstfGSUBModList"
|
||||||
#define Sequence otv_x_ux, "Sequence"
|
#define Sequence otv_x_ux, "Sequence"
|
||||||
|
#endif
|
||||||
|
#define AlternateSetFunc otv_x_ux
|
||||||
|
#define AttachPointFunc otv_x_ux
|
||||||
|
#define ExtenderGlyphFunc otv_x_ux
|
||||||
|
#define JstfGPOSModListFunc otv_x_ux
|
||||||
|
#define JstfGSUBModListFunc otv_x_ux
|
||||||
|
#define SequenceFunc otv_x_ux
|
||||||
|
|
||||||
FT_LOCAL( void )
|
FT_LOCAL( void )
|
||||||
otv_x_ux( FT_Bytes table,
|
otv_x_ux( FT_Bytes table,
|
||||||
OTV_Validator valid );
|
OTV_Validator valid );
|
||||||
|
|
||||||
|
#if 0
|
||||||
#define PosClassRule otv_x_y_ux_sy, "PosClassRule"
|
#define PosClassRule otv_x_y_ux_sy, "PosClassRule"
|
||||||
#define PosRule otv_x_y_ux_sy, "PosRule"
|
#define PosRule otv_x_y_ux_sy, "PosRule"
|
||||||
#define SubClassRule otv_x_y_ux_sy, "SubClassRule"
|
#define SubClassRule otv_x_y_ux_sy, "SubClassRule"
|
||||||
#define SubRule otv_x_y_ux_sy, "SubRule"
|
#define SubRule otv_x_y_ux_sy, "SubRule"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PosClassRuleFunc otv_x_y_ux_sy
|
||||||
|
#define PosRuleFunc otv_x_y_ux_sy
|
||||||
|
#define SubClassRuleFunc otv_x_y_ux_sy
|
||||||
|
#define SubRuleFunc otv_x_y_ux_sy
|
||||||
|
|
||||||
FT_LOCAL( void )
|
FT_LOCAL( void )
|
||||||
otv_x_y_ux_sy( FT_Bytes table,
|
otv_x_y_ux_sy( FT_Bytes table,
|
||||||
OTV_Validator valid );
|
OTV_Validator valid );
|
||||||
|
|
||||||
|
#if 0
|
||||||
#define ChainPosClassRule otv_x_ux_y_uy_z_uz_p_sp, "ChainPosClassRule"
|
#define ChainPosClassRule otv_x_ux_y_uy_z_uz_p_sp, "ChainPosClassRule"
|
||||||
#define ChainPosRule otv_x_ux_y_uy_z_uz_p_sp, "ChainPosRule"
|
#define ChainPosRule otv_x_ux_y_uy_z_uz_p_sp, "ChainPosRule"
|
||||||
#define ChainSubClassRule otv_x_ux_y_uy_z_uz_p_sp, "ChainSubClassRule"
|
#define ChainSubClassRule otv_x_ux_y_uy_z_uz_p_sp, "ChainSubClassRule"
|
||||||
#define ChainSubRule otv_x_ux_y_uy_z_uz_p_sp, "ChainSubRule"
|
#define ChainSubRule otv_x_ux_y_uy_z_uz_p_sp, "ChainSubRule"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ChainPosClassRuleFunc otv_x_ux_y_uy_z_uz_p_sp
|
||||||
|
#define ChainPosRuleFunc otv_x_ux_y_uy_z_uz_p_sp
|
||||||
|
#define ChainSubClassRuleFunc otv_x_ux_y_uy_z_uz_p_sp
|
||||||
|
#define ChainSubRuleFunc otv_x_ux_y_uy_z_uz_p_sp
|
||||||
|
|
||||||
FT_LOCAL( void )
|
FT_LOCAL( void )
|
||||||
otv_x_ux_y_uy_z_uz_p_sp( FT_Bytes table,
|
otv_x_ux_y_uy_z_uz_p_sp( FT_Bytes table,
|
||||||
OTV_Validator valid );
|
OTV_Validator valid );
|
||||||
|
|
||||||
|
#if 0
|
||||||
#define ContextPosFormat2 otv_u_O_O_x_Onx, "ContextPosFormat2"
|
#define ContextPosFormat2 otv_u_O_O_x_Onx, "ContextPosFormat2"
|
||||||
#define ContextSubstFormat2 otv_u_O_O_x_Onx, "ContextSubstFormat2"
|
#define ContextSubstFormat2 otv_u_O_O_x_Onx, "ContextSubstFormat2"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ContextPosFormat2Func otv_u_O_O_x_Onx
|
||||||
|
#define ContextSubstFormat2Func otv_u_O_O_x_Onx
|
||||||
|
|
||||||
FT_LOCAL( void )
|
FT_LOCAL( void )
|
||||||
otv_u_O_O_x_Onx( FT_Bytes table,
|
otv_u_O_O_x_Onx( FT_Bytes table,
|
||||||
OTV_Validator valid );
|
OTV_Validator valid );
|
||||||
|
|
||||||
|
#if 0
|
||||||
#define ContextPosFormat3 otv_u_x_y_Ox_sy, "ContextPosFormat3"
|
#define ContextPosFormat3 otv_u_x_y_Ox_sy, "ContextPosFormat3"
|
||||||
#define ContextSubstFormat3 otv_u_x_y_Ox_sy, "ContextSubstFormat3"
|
#define ContextSubstFormat3 otv_u_x_y_Ox_sy, "ContextSubstFormat3"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ContextPosFormat3Func otv_u_x_y_Ox_sy
|
||||||
|
#define ContextSubstFormat3Func otv_u_x_y_Ox_sy
|
||||||
|
|
||||||
FT_LOCAL( void )
|
FT_LOCAL( void )
|
||||||
otv_u_x_y_Ox_sy( FT_Bytes table,
|
otv_u_x_y_Ox_sy( FT_Bytes table,
|
||||||
OTV_Validator valid );
|
OTV_Validator valid );
|
||||||
|
|
||||||
|
#if 0
|
||||||
#define ChainContextPosFormat2 otv_u_O_O_O_O_x_Onx, "ChainContextPosFormat2"
|
#define ChainContextPosFormat2 otv_u_O_O_O_O_x_Onx, "ChainContextPosFormat2"
|
||||||
#define ChainContextSubstFormat2 otv_u_O_O_O_O_x_Onx, "ChainContextSubstFormat2"
|
#define ChainContextSubstFormat2 otv_u_O_O_O_O_x_Onx, "ChainContextSubstFormat2"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ChainContextPosFormat2Func otv_u_O_O_O_O_x_Onx
|
||||||
|
#define ChainContextSubstFormat2Func otv_u_O_O_O_O_x_Onx
|
||||||
|
|
||||||
FT_LOCAL( void )
|
FT_LOCAL( void )
|
||||||
otv_u_O_O_O_O_x_Onx( FT_Bytes table,
|
otv_u_O_O_O_O_x_Onx( FT_Bytes table,
|
||||||
OTV_Validator valid );
|
OTV_Validator valid );
|
||||||
|
|
||||||
|
#if 0
|
||||||
#define ChainContextPosFormat3 otv_u_x_Ox_y_Oy_z_Oz_p_sp, "ChainContextPosFormat3"
|
#define ChainContextPosFormat3 otv_u_x_Ox_y_Oy_z_Oz_p_sp, "ChainContextPosFormat3"
|
||||||
#define ChainContextSubstFormat3 otv_u_x_Ox_y_Oy_z_Oz_p_sp, "ChainContextSubstFormat3"
|
#define ChainContextSubstFormat3 otv_u_x_Ox_y_Oy_z_Oz_p_sp, "ChainContextSubstFormat3"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ChainContextPosFormat3Func otv_u_x_Ox_y_Oy_z_Oz_p_sp
|
||||||
|
#define ChainContextSubstFormat3Func otv_u_x_Ox_y_Oy_z_Oz_p_sp
|
||||||
|
|
||||||
FT_LOCAL( void )
|
FT_LOCAL( void )
|
||||||
otv_u_x_Ox_y_Oy_z_Oz_p_sp( FT_Bytes table,
|
otv_u_x_Ox_y_Oy_z_Oz_p_sp( FT_Bytes table,
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#define AttachList otv_O_x_Ox, "AttachList"
|
#define AttachListFunc otv_O_x_Ox
|
||||||
#define LigCaretList otv_O_x_Ox, "LigCaretList"
|
#define LigCaretListFunc otv_O_x_Ox
|
||||||
|
|
||||||
/* sets valid->extra1 (0) */
|
/* sets valid->extra1 (0) */
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#define CaretValue otv_CaretValue_validate, "CaretValue"
|
#define CaretValueFunc otv_CaretValue_validate
|
||||||
|
|
||||||
static void
|
static void
|
||||||
otv_CaretValue_validate( FT_Bytes table,
|
otv_CaretValue_validate( FT_Bytes table,
|
||||||
|
|
|
@ -48,9 +48,9 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#define BaseArray otv_x_sxy, "BaseArray"
|
#define BaseArrayFunc otv_x_sxy
|
||||||
#define LigatureAttach otv_x_sxy, "LigatureAttach"
|
#define LigatureAttachFunc otv_x_sxy
|
||||||
#define Mark2Array otv_x_sxy, "Mark2Array"
|
#define Mark2ArrayFunc otv_x_sxy
|
||||||
|
|
||||||
/* uses valid->extra1 (counter) */
|
/* uses valid->extra1 (counter) */
|
||||||
/* uses valid->extra2 (boolean to handle NULL anchor field) */
|
/* uses valid->extra2 (boolean to handle NULL anchor field) */
|
||||||
|
@ -97,9 +97,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define MarkBasePosFormat1 otv_u_O_O_u_O_O, "MarkBasePosFormat1"
|
#define MarkBasePosFormat1Func otv_u_O_O_u_O_O
|
||||||
#define MarkLigPosFormat1 otv_u_O_O_u_O_O, "MarkLigPosFormat1"
|
#define MarkLigPosFormat1Func otv_u_O_O_u_O_O
|
||||||
#define MarkMarkPosFormat1 otv_u_O_O_u_O_O, "MarkMarkPosFormat1"
|
#define MarkMarkPosFormat1Func otv_u_O_O_u_O_O
|
||||||
|
|
||||||
/* sets valid->extra1 (class count) */
|
/* sets valid->extra1 (class count) */
|
||||||
|
|
||||||
|
@ -861,8 +861,7 @@
|
||||||
/* context rules since even invalid glyph indices/classes return */
|
/* context rules since even invalid glyph indices/classes return */
|
||||||
/* meaningful results */
|
/* meaningful results */
|
||||||
|
|
||||||
OTV_NEST3( ChainContextPosFormat2,
|
OTV_NEST3( ChainContextPosFormat2,ChainPosClassSet, ChainPosClassRule );
|
||||||
ChainPosClassSet, ChainPosClassRule );
|
|
||||||
OTV_RUN( table, valid );
|
OTV_RUN( table, valid );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#define Ligature otv_Ligature_validate, "Ligature"
|
#define LigatureFunc otv_Ligature_validate
|
||||||
|
|
||||||
/* uses valid->glyph_count */
|
/* uses valid->glyph_count */
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
#define FT_COMPONENT trace_otvjstf
|
#define FT_COMPONENT trace_otvjstf
|
||||||
|
|
||||||
|
|
||||||
#define JstfPriority otv_JstfPriority_validate, "JstfPriority"
|
#define JstfPriorityFunc otv_JstfPriority_validate
|
||||||
#define JstfLookup otv_GPOS_subtable_validate, ""
|
#define JstfLookupFunc otv_GPOS_subtable_validate
|
||||||
|
|
||||||
/* uses valid->extra1 (GSUB lookup count) */
|
/* uses valid->extra1 (GSUB lookup count) */
|
||||||
/* uses valid->extra2 (GPOS lookup count) */
|
/* uses valid->extra2 (GPOS lookup count) */
|
||||||
|
|
|
@ -2160,7 +2160,7 @@
|
||||||
if ( clazz->format == format )
|
if ( clazz->format == format )
|
||||||
{
|
{
|
||||||
volatile TT_ValidatorRec valid;
|
volatile TT_ValidatorRec valid;
|
||||||
FT_Error error = SFNT_Err_Ok;
|
volatile FT_Error error = SFNT_Err_Ok;
|
||||||
|
|
||||||
|
|
||||||
ft_validator_init( FT_VALIDATOR( &valid ), cmap, limit,
|
ft_validator_init( FT_VALIDATOR( &valid ), cmap, limit,
|
||||||
|
|
|
@ -1774,18 +1774,20 @@
|
||||||
/* table in the font. Otherwise, we use the */
|
/* table in the font. Otherwise, we use the */
|
||||||
/* values defined in the horizontal header. */
|
/* values defined in the horizontal header. */
|
||||||
|
|
||||||
height = FT_DivFix( bbox.yMax - bbox.yMin, y_scale );
|
height = (FT_Short)FT_DivFix( bbox.yMax - bbox.yMin, y_scale );
|
||||||
if ( face->os2.version != 0xFFFFU )
|
if ( face->os2.version != 0xFFFFU )
|
||||||
{
|
{
|
||||||
/* sTypoDescender is negative */
|
/* sTypoDescender is negative */
|
||||||
max_height = face->os2.sTypoAscender - face->os2.sTypoDescender;
|
max_height = (FT_Short)(face->os2.sTypoAscender -
|
||||||
|
face->os2.sTypoDescender);
|
||||||
|
|
||||||
top_bearing = (FT_Short)( ( max_height - height ) / 2 );
|
top_bearing = (FT_Short)( ( max_height - height ) / 2 );
|
||||||
advance_height = (FT_UShort)( max_height + face->os2.sTypoLineGap );
|
advance_height = (FT_UShort)( max_height + face->os2.sTypoLineGap );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
max_height = face->horizontal.Ascender + face->horizontal.Descender;
|
max_height = (FT_Short)(face->horizontal.Ascender +
|
||||||
|
face->horizontal.Descender);
|
||||||
|
|
||||||
top_bearing = (FT_Short)( ( max_height - height ) / 2 );
|
top_bearing = (FT_Short)( ( max_height - height ) / 2 );
|
||||||
advance_height = (FT_UShort)( max_height +
|
advance_height = (FT_UShort)( max_height +
|
||||||
|
|
Loading…
Reference in New Issue