[autofit] Some formatting and clean-ups.
This commit is contained in:
parent
dcdb3167dc
commit
332da87d99
@ -5,7 +5,7 @@
|
||||
/* Routines used to compute vector angles with limited accuracy */
|
||||
/* and very high speed. It also contains sorting routines (body). */
|
||||
/* */
|
||||
/* Copyright 2003, 2004, 2005, 2006 by */
|
||||
/* Copyright 2003-2006, 2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -77,7 +77,7 @@
|
||||
return 1 - 2 * ( delta < 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* 0 */
|
||||
|
||||
|
||||
/*
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* Auto-fitter dummy routines to be used if no hinting should be */
|
||||
/* performed (body). */
|
||||
/* */
|
||||
/* Copyright 2003, 2004, 2005 by */
|
||||
/* Copyright 2003-2005, 2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -27,7 +27,7 @@
|
||||
{
|
||||
af_glyph_hints_rescale( hints,
|
||||
metrics );
|
||||
return 0;
|
||||
return AF_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
@ -38,11 +38,11 @@
|
||||
FT_UNUSED( hints );
|
||||
FT_UNUSED( outline );
|
||||
|
||||
return 0;
|
||||
return AF_Err_Ok;
|
||||
}
|
||||
|
||||
|
||||
AF_DEFINE_SCRIPT_CLASS(af_dummy_script_class,
|
||||
AF_DEFINE_SCRIPT_CLASS( af_dummy_script_class,
|
||||
AF_SCRIPT_NONE,
|
||||
NULL,
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* Auto-fitter dummy routines to be used if no hinting should be */
|
||||
/* performed (specification). */
|
||||
/* */
|
||||
/* Copyright 2003, 2004, 2005 by */
|
||||
/* Copyright 2003-2005, 2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -29,7 +29,7 @@ FT_BEGIN_HEADER
|
||||
* be performed. This is the default for non-latin glyphs!
|
||||
*/
|
||||
|
||||
AF_DECLARE_SCRIPT_CLASS(af_dummy_script_class)
|
||||
AF_DECLARE_SCRIPT_CLASS( af_dummy_script_class )
|
||||
|
||||
/* */
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Auto-fitter routines to compute global hinting values (body). */
|
||||
/* */
|
||||
/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */
|
||||
/* Copyright 2003-2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -31,8 +31,8 @@
|
||||
|
||||
#ifndef FT_CONFIG_OPTION_PIC
|
||||
|
||||
/* when updating this table, don't forget to update
|
||||
AF_SCRIPT_CLASSES_COUNT and autofit_module_class_pic_init */
|
||||
/* when updating this table, don't forget to update */
|
||||
/* AF_SCRIPT_CLASSES_COUNT and autofit_module_class_pic_init */
|
||||
|
||||
/* populate this list when you add new scripts */
|
||||
static AF_ScriptClass const af_script_classes[] =
|
||||
@ -47,7 +47,7 @@
|
||||
NULL /* do not remove */
|
||||
};
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_PIC */
|
||||
#endif /* !FT_CONFIG_OPTION_PIC */
|
||||
|
||||
/* index of default script in `af_script_classes' */
|
||||
#define AF_SCRIPT_LIST_DEFAULT 2
|
||||
@ -85,7 +85,7 @@
|
||||
FT_UInt ss, i;
|
||||
|
||||
|
||||
/* the value 255 means `uncovered glyph' */
|
||||
/* the value AF_SCRIPT_LIST_NONE means `uncovered glyph' */
|
||||
FT_MEM_SET( globals->glyph_scripts,
|
||||
AF_SCRIPT_LIST_NONE,
|
||||
globals->glyph_count );
|
||||
@ -126,9 +126,7 @@
|
||||
if ( gindex != 0 &&
|
||||
gindex < (FT_ULong)globals->glyph_count &&
|
||||
gscripts[gindex] == AF_SCRIPT_LIST_NONE )
|
||||
{
|
||||
gscripts[gindex] = (FT_Byte)ss;
|
||||
}
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@ -139,9 +137,7 @@
|
||||
|
||||
if ( gindex < (FT_ULong)globals->glyph_count &&
|
||||
gscripts[gindex] == AF_SCRIPT_LIST_NONE )
|
||||
{
|
||||
gscripts[gindex] = (FT_Byte)ss;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Auto-fitter types (specification only). */
|
||||
/* */
|
||||
/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
|
||||
/* Copyright 2003-2009, 2011 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -241,7 +241,7 @@ extern void* _af_debug_hints;
|
||||
/*************************************************************************/
|
||||
|
||||
/*
|
||||
* The list of know scripts. Each different script corresponds to the
|
||||
* The list of known scripts. Each different script corresponds to the
|
||||
* following information:
|
||||
*
|
||||
* - A set of Unicode ranges to test whether the face supports the
|
||||
@ -342,55 +342,57 @@ extern void* _af_debug_hints;
|
||||
|
||||
} AF_ScriptClassRec;
|
||||
|
||||
/* Declare and define vtables for classes */
|
||||
|
||||
/* Declare and define vtables for classes */
|
||||
#ifndef FT_CONFIG_OPTION_PIC
|
||||
|
||||
#define AF_DECLARE_SCRIPT_CLASS(script_class) \
|
||||
FT_CALLBACK_TABLE const AF_ScriptClassRec \
|
||||
#define AF_DECLARE_SCRIPT_CLASS( script_class ) \
|
||||
FT_CALLBACK_TABLE const AF_ScriptClassRec \
|
||||
script_class;
|
||||
|
||||
#define AF_DEFINE_SCRIPT_CLASS(script_class, script_, ranges, m_size, \
|
||||
m_init, m_scale, m_done, h_init, h_apply) \
|
||||
FT_CALLBACK_TABLE_DEF const AF_ScriptClassRec \
|
||||
script_class = \
|
||||
{ \
|
||||
script_, \
|
||||
ranges, \
|
||||
\
|
||||
m_size, \
|
||||
\
|
||||
m_init, \
|
||||
m_scale, \
|
||||
m_done, \
|
||||
\
|
||||
h_init, \
|
||||
h_apply \
|
||||
#define AF_DEFINE_SCRIPT_CLASS( script_class, script_, ranges, m_size, \
|
||||
m_init, m_scale, m_done, h_init, h_apply ) \
|
||||
FT_CALLBACK_TABLE_DEF const AF_ScriptClassRec \
|
||||
script_class = \
|
||||
{ \
|
||||
script_, \
|
||||
ranges, \
|
||||
\
|
||||
m_size, \
|
||||
\
|
||||
m_init, \
|
||||
m_scale, \
|
||||
m_done, \
|
||||
\
|
||||
h_init, \
|
||||
h_apply \
|
||||
};
|
||||
|
||||
#else
|
||||
#else /* FT_CONFIG_OPTION_PIC */
|
||||
|
||||
#define AF_DECLARE_SCRIPT_CLASS(script_class) \
|
||||
FT_LOCAL(void) \
|
||||
FT_Init_Class_##script_class(AF_ScriptClassRec* ac);
|
||||
#define AF_DECLARE_SCRIPT_CLASS( script_class ) \
|
||||
FT_LOCAL( void ) \
|
||||
FT_Init_Class_##script_class( AF_ScriptClassRec* ac );
|
||||
|
||||
#define AF_DEFINE_SCRIPT_CLASS(script_class, script_, ranges, m_size, \
|
||||
m_init, m_scale, m_done, h_init, h_apply) \
|
||||
FT_LOCAL_DEF(void) \
|
||||
FT_Init_Class_##script_class(AF_ScriptClassRec* ac) \
|
||||
{ \
|
||||
ac->script = script_; \
|
||||
ac->script_uni_ranges = ranges; \
|
||||
\
|
||||
ac->script_metrics_size = m_size; \
|
||||
\
|
||||
ac->script_metrics_init = m_init; \
|
||||
ac->script_metrics_scale = m_scale; \
|
||||
ac->script_metrics_done = m_done; \
|
||||
\
|
||||
ac->script_hints_init = h_init; \
|
||||
ac->script_hints_apply = h_apply; \
|
||||
#define AF_DEFINE_SCRIPT_CLASS( script_class, script_, ranges, m_size, \
|
||||
m_init, m_scale, m_done, h_init, h_apply ) \
|
||||
FT_LOCAL_DEF( void ) \
|
||||
FT_Init_Class_##script_class( AF_ScriptClassRec* ac ) \
|
||||
{ \
|
||||
ac->script = script_; \
|
||||
ac->script_uni_ranges = ranges; \
|
||||
\
|
||||
ac->script_metrics_size = m_size; \
|
||||
\
|
||||
ac->script_metrics_init = m_init; \
|
||||
ac->script_metrics_scale = m_scale; \
|
||||
ac->script_metrics_done = m_done; \
|
||||
\
|
||||
ac->script_hints_init = h_init; \
|
||||
ac->script_hints_apply = h_apply; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_PIC */
|
||||
|
||||
|
||||
/* */
|
||||
|
Loading…
Reference in New Issue
Block a user