зеркало из https://github.com/stride3d/freetype.git
[sfnt] Formatting.
This commit is contained in:
Родитель
b355b5693a
Коммит
d77b1ea012
|
@ -508,7 +508,7 @@
|
|||
FT_TRACE2(( "`" #x "' " )); \
|
||||
FT_TRACE3(( "-->\n" )); \
|
||||
\
|
||||
error = sfnt->load_##x( face, stream ); \
|
||||
error = sfnt->load_ ## x( face, stream ); \
|
||||
\
|
||||
FT_TRACE2(( "%s\n", ( !error ) \
|
||||
? "loaded" \
|
||||
|
@ -524,7 +524,7 @@
|
|||
vertical ? "vertical " : "" )); \
|
||||
FT_TRACE3(( "-->\n" )); \
|
||||
\
|
||||
error = sfnt->load_##x( face, stream, vertical ); \
|
||||
error = sfnt->load_ ## x( face, stream, vertical ); \
|
||||
\
|
||||
FT_TRACE2(( "%s\n", ( !error ) \
|
||||
? "loaded" \
|
||||
|
@ -534,11 +534,11 @@
|
|||
FT_TRACE3(( "\n" )); \
|
||||
} while ( 0 )
|
||||
|
||||
#define GET_NAME( id, field ) \
|
||||
do { \
|
||||
error = tt_face_get_name( face, TT_NAME_ID_##id, field ); \
|
||||
if ( error ) \
|
||||
goto Exit; \
|
||||
#define GET_NAME( id, field ) \
|
||||
do { \
|
||||
error = tt_face_get_name( face, TT_NAME_ID_ ## id, field ); \
|
||||
if ( error ) \
|
||||
goto Exit; \
|
||||
} while ( 0 )
|
||||
|
||||
|
||||
|
@ -555,13 +555,14 @@
|
|||
#endif
|
||||
FT_Bool has_outline;
|
||||
FT_Bool is_apple_sbit;
|
||||
FT_Bool ignore_preferred_family = FALSE;
|
||||
FT_Bool ignore_preferred_family = FALSE;
|
||||
FT_Bool ignore_preferred_subfamily = FALSE;
|
||||
|
||||
SFNT_Service sfnt = (SFNT_Service)face->sfnt;
|
||||
|
||||
FT_UNUSED( face_index );
|
||||
|
||||
|
||||
/* Check parameters */
|
||||
|
||||
{
|
||||
|
@ -667,7 +668,7 @@
|
|||
get_glyph_metrics )
|
||||
{
|
||||
face->horizontal.number_Of_HMetrics = 0;
|
||||
error = SFNT_Err_Ok;
|
||||
error = SFNT_Err_Ok;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -694,7 +695,7 @@
|
|||
get_glyph_metrics )
|
||||
{
|
||||
face->horizontal.number_Of_HMetrics = 0;
|
||||
error = SFNT_Err_Ok;
|
||||
error = SFNT_Err_Ok;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/* */
|
||||
/* TrueType character mapping table (cmap) support (specification). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004, 2005 by */
|
||||
/* Copyright 2002-2005, 2009, 2012 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
|
@ -55,47 +55,80 @@ FT_BEGIN_HEADER
|
|||
|
||||
} TT_CMap_ClassRec;
|
||||
|
||||
|
||||
#ifndef FT_CONFIG_OPTION_PIC
|
||||
|
||||
#define FT_DEFINE_TT_CMAP(class_, size_, init_, done_, char_index_, \
|
||||
char_next_, char_var_index_, char_var_default_, variant_list_, \
|
||||
charvariant_list_,variantchar_list_, \
|
||||
format_, validate_, get_cmap_info_) \
|
||||
FT_CALLBACK_TABLE_DEF \
|
||||
const TT_CMap_ClassRec class_ = \
|
||||
{ \
|
||||
{size_, init_, done_, char_index_, \
|
||||
char_next_, char_var_index_, char_var_default_, variant_list_, \
|
||||
charvariant_list_, variantchar_list_}, \
|
||||
format_, validate_, get_cmap_info_ \
|
||||
#define FT_DEFINE_TT_CMAP( class_, \
|
||||
size_, \
|
||||
init_, \
|
||||
done_, \
|
||||
char_index_, \
|
||||
char_next_, \
|
||||
char_var_index_, \
|
||||
char_var_default_, \
|
||||
variant_list_, \
|
||||
charvariant_list_, \
|
||||
variantchar_list_, \
|
||||
format_, \
|
||||
validate_, \
|
||||
get_cmap_info_ ) \
|
||||
FT_CALLBACK_TABLE_DEF \
|
||||
const TT_CMap_ClassRec class_ = \
|
||||
{ \
|
||||
{ size_, \
|
||||
init_, \
|
||||
done_, \
|
||||
char_index_, \
|
||||
char_next_, \
|
||||
char_var_index_, \
|
||||
char_var_default_, \
|
||||
variant_list_, \
|
||||
charvariant_list_, \
|
||||
variantchar_list_ \
|
||||
}, \
|
||||
\
|
||||
format_, \
|
||||
validate_, \
|
||||
get_cmap_info_ \
|
||||
};
|
||||
|
||||
#else /* FT_CONFIG_OPTION_PIC */
|
||||
|
||||
#define FT_DEFINE_TT_CMAP(class_, size_, init_, done_, char_index_, \
|
||||
char_next_, char_var_index_, char_var_default_, variant_list_, \
|
||||
charvariant_list_,variantchar_list_, \
|
||||
format_, validate_, get_cmap_info_) \
|
||||
void \
|
||||
FT_Init_Class_##class_( TT_CMap_ClassRec* clazz ) \
|
||||
{ \
|
||||
clazz->clazz.size = size_; \
|
||||
clazz->clazz.init = init_; \
|
||||
clazz->clazz.done = done_; \
|
||||
clazz->clazz.char_index = char_index_; \
|
||||
clazz->clazz.char_next = char_next_; \
|
||||
clazz->clazz.char_var_index = char_var_index_; \
|
||||
clazz->clazz.char_var_default = char_var_default_; \
|
||||
clazz->clazz.variant_list = variant_list_; \
|
||||
clazz->clazz.charvariant_list = charvariant_list_; \
|
||||
clazz->clazz.variantchar_list = variantchar_list_; \
|
||||
clazz->format = format_; \
|
||||
clazz->validate = validate_; \
|
||||
clazz->get_cmap_info = get_cmap_info_; \
|
||||
#define FT_DEFINE_TT_CMAP( class_, \
|
||||
size_, \
|
||||
init_, \
|
||||
done_, \
|
||||
char_index_, \
|
||||
char_next_, \
|
||||
char_var_index_, \
|
||||
char_var_default_, \
|
||||
variant_list_, \
|
||||
charvariant_list_, \
|
||||
variantchar_list_, \
|
||||
format_, \
|
||||
validate_, \
|
||||
get_cmap_info_ ) \
|
||||
void \
|
||||
FT_Init_Class_ ## class_( TT_CMap_ClassRec* clazz ) \
|
||||
{ \
|
||||
clazz->clazz.size = size_; \
|
||||
clazz->clazz.init = init_; \
|
||||
clazz->clazz.done = done_; \
|
||||
clazz->clazz.char_index = char_index_; \
|
||||
clazz->clazz.char_next = char_next_; \
|
||||
clazz->clazz.char_var_index = char_var_index_; \
|
||||
clazz->clazz.char_var_default = char_var_default_; \
|
||||
clazz->clazz.variant_list = variant_list_; \
|
||||
clazz->clazz.charvariant_list = charvariant_list_; \
|
||||
clazz->clazz.variantchar_list = variantchar_list_; \
|
||||
clazz->format = format_; \
|
||||
clazz->validate = validate_; \
|
||||
clazz->get_cmap_info = get_cmap_info_; \
|
||||
}
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_PIC */
|
||||
|
||||
|
||||
typedef struct TT_ValidatorRec_
|
||||
{
|
||||
FT_ValidatorRec validator;
|
||||
|
@ -104,7 +137,7 @@ FT_BEGIN_HEADER
|
|||
} TT_ValidatorRec, *TT_Validator;
|
||||
|
||||
|
||||
#define TT_VALIDATOR( x ) ((TT_Validator)( x ))
|
||||
#define TT_VALIDATOR( x ) ( (TT_Validator)( x ) )
|
||||
#define TT_VALID_GLYPH_COUNT( x ) TT_VALIDATOR( x )->num_glyphs
|
||||
|
||||
|
||||
|
|
|
@ -17,39 +17,40 @@
|
|||
|
||||
|
||||
#ifdef TT_CONFIG_CMAP_FORMAT_0
|
||||
TTCMAPCITEM(tt_cmap0_class_rec)
|
||||
TTCMAPCITEM( tt_cmap0_class_rec )
|
||||
#endif
|
||||
|
||||
#ifdef TT_CONFIG_CMAP_FORMAT_2
|
||||
TTCMAPCITEM(tt_cmap2_class_rec)
|
||||
TTCMAPCITEM( tt_cmap2_class_rec )
|
||||
#endif
|
||||
|
||||
#ifdef TT_CONFIG_CMAP_FORMAT_4
|
||||
TTCMAPCITEM(tt_cmap4_class_rec)
|
||||
TTCMAPCITEM( tt_cmap4_class_rec )
|
||||
#endif
|
||||
|
||||
#ifdef TT_CONFIG_CMAP_FORMAT_6
|
||||
TTCMAPCITEM(tt_cmap6_class_rec)
|
||||
TTCMAPCITEM( tt_cmap6_class_rec )
|
||||
#endif
|
||||
|
||||
#ifdef TT_CONFIG_CMAP_FORMAT_8
|
||||
TTCMAPCITEM(tt_cmap8_class_rec)
|
||||
TTCMAPCITEM( tt_cmap8_class_rec )
|
||||
#endif
|
||||
|
||||
#ifdef TT_CONFIG_CMAP_FORMAT_10
|
||||
TTCMAPCITEM(tt_cmap10_class_rec)
|
||||
TTCMAPCITEM( tt_cmap10_class_rec )
|
||||
#endif
|
||||
|
||||
#ifdef TT_CONFIG_CMAP_FORMAT_12
|
||||
TTCMAPCITEM(tt_cmap12_class_rec)
|
||||
TTCMAPCITEM( tt_cmap12_class_rec )
|
||||
#endif
|
||||
|
||||
#ifdef TT_CONFIG_CMAP_FORMAT_13
|
||||
TTCMAPCITEM(tt_cmap13_class_rec)
|
||||
TTCMAPCITEM( tt_cmap13_class_rec )
|
||||
#endif
|
||||
|
||||
#ifdef TT_CONFIG_CMAP_FORMAT_14
|
||||
TTCMAPCITEM(tt_cmap14_class_rec)
|
||||
TTCMAPCITEM( tt_cmap14_class_rec )
|
||||
#endif
|
||||
|
||||
|
||||
/* END */
|
||||
|
|
Загрузка…
Ссылка в новой задаче