[truetype] Fix C++ compilation.
* src/truetype/ttsubpix.h: Updated. (SPH_X_SCALING_RULES_SIZE): Moved and renamed to... * src/truetype/ttsubpix.c (X_SCALING_RULES_SIZE): This. (sph_X_SCALING_Rules): Removed. (scale_test_tweak): Make function static. (sph_test_tweak_x_scaling): New function. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Updated.
This commit is contained in:
parent
4cd5fd463e
commit
72447195ce
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2013-01-25 David 'Digit' Turner <digit@google.com>
|
||||
|
||||
[truetype] Fix C++ compilation.
|
||||
|
||||
* src/truetype/ttsubpix.h: Updated.
|
||||
(SPH_X_SCALING_RULES_SIZE): Moved and renamed to...
|
||||
* src/truetype/ttsubpix.c (X_SCALING_RULES_SIZE): This.
|
||||
(sph_X_SCALING_Rules): Removed.
|
||||
(scale_test_tweak): Make function static.
|
||||
(sph_test_tweak_x_scaling): New function.
|
||||
|
||||
* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Updated.
|
||||
|
||||
2013-01-23 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[base] Make `FT_Hypot' really internal.
|
||||
|
|
|
@ -913,10 +913,11 @@
|
|||
#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
|
||||
/* scale, but only if enabled and only if TT hinting is being used */
|
||||
if ( IS_HINTED( loader->load_flags ) )
|
||||
x_scale_factor = scale_test_tweak( face, family, ppem, style,
|
||||
loader->glyph_index,
|
||||
sph_X_SCALING_Rules,
|
||||
SPH_X_SCALING_RULES_SIZE );
|
||||
x_scale_factor = sph_test_tweak_x_scaling( face,
|
||||
family,
|
||||
ppem,
|
||||
style,
|
||||
loader->glyph_index );
|
||||
/* scale the glyph */
|
||||
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 ||
|
||||
x_scale_factor != 1000 )
|
||||
|
|
|
@ -756,7 +756,9 @@
|
|||
/* This sometimes needs to be coordinated with compatible width rules. */
|
||||
/* A value of 1000 corresponds to a scaled value of 1.0. */
|
||||
|
||||
static const SPH_ScaleRule X_SCALING_Rules[SPH_X_SCALING_RULES_SIZE] =
|
||||
#define X_SCALING_RULES_SIZE 50
|
||||
|
||||
static const SPH_ScaleRule X_SCALING_Rules[X_SCALING_RULES_SIZE] =
|
||||
{
|
||||
{ "DejaVu Sans", 12, "Regular Class", 'm', 950 },
|
||||
{ "Verdana and Clones", 12, "Regular Class", 'a', 1100 },
|
||||
|
@ -834,10 +836,6 @@
|
|||
#endif /* FORCE_NATURAL_WIDTHS */
|
||||
|
||||
|
||||
FT_LOCAL_DEF( const SPH_ScaleRule* const ) sph_X_SCALING_Rules
|
||||
= X_SCALING_Rules;
|
||||
|
||||
|
||||
FT_LOCAL_DEF( FT_Bool )
|
||||
is_member_of_family_class( const FT_String* detected_font_name,
|
||||
const FT_String* rule_font_name )
|
||||
|
@ -939,7 +937,7 @@
|
|||
}
|
||||
|
||||
|
||||
FT_LOCAL_DEF( FT_UInt )
|
||||
static FT_UInt
|
||||
scale_test_tweak( TT_Face face,
|
||||
const FT_String* family,
|
||||
FT_UInt ppem,
|
||||
|
@ -970,6 +968,18 @@
|
|||
}
|
||||
|
||||
|
||||
FT_LOCAL_DEF( FT_UInt )
|
||||
sph_test_tweak_x_scaling( TT_Face face,
|
||||
const FT_String* family,
|
||||
FT_UInt ppem,
|
||||
const FT_String* style,
|
||||
FT_UInt glyph_index )
|
||||
{
|
||||
return scale_test_tweak( face, family, ppem, style, glyph_index,
|
||||
X_SCALING_Rules, X_SCALING_RULES_SIZE );
|
||||
}
|
||||
|
||||
|
||||
#define TWEAK_RULES( x ) \
|
||||
if ( sph_test_tweak( face, family, ppem, style, glyph_index, \
|
||||
x##_Rules, x##_RULES_SIZE ) ) \
|
||||
|
|
|
@ -70,24 +70,17 @@ FT_BEGIN_HEADER
|
|||
FT_UInt num_rules );
|
||||
|
||||
FT_LOCAL( FT_UInt )
|
||||
scale_test_tweak( TT_Face face,
|
||||
const FT_String* family,
|
||||
FT_UInt ppem,
|
||||
const FT_String* style,
|
||||
FT_UInt glyph_index,
|
||||
const SPH_ScaleRule* rule,
|
||||
FT_UInt num_rules );
|
||||
sph_test_tweak_x_scaling( TT_Face face,
|
||||
const FT_String* family,
|
||||
FT_UInt ppem,
|
||||
const FT_String* style,
|
||||
FT_UInt glyph_index );
|
||||
|
||||
FT_LOCAL( void )
|
||||
sph_set_tweaks( TT_Loader loader,
|
||||
FT_UInt glyph_index );
|
||||
|
||||
|
||||
#define SPH_X_SCALING_RULES_SIZE 50
|
||||
|
||||
FT_LOCAL( const SPH_ScaleRule* const ) sph_X_SCALING_Rules;
|
||||
|
||||
|
||||
/* These macros are defined absent a method for setting them */
|
||||
#define SPH_OPTION_BITMAP_WIDTHS FALSE
|
||||
#define SPH_OPTION_SET_SUBPIXEL TRUE
|
||||
|
|
Loading…
Reference in New Issue