summaryrefslogtreecommitdiffstats
path: root/src/autofit/afloader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/autofit/afloader.c')
-rw-r--r--src/autofit/afloader.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index 966a0df..34ef9d8 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter glyph loading routines (body). */
/* */
-/* Copyright 2003-2009, 2011 by */
+/* Copyright 2003-2009, 2011-2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -433,9 +433,10 @@
slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
x_scale );
#else
- if ( FT_IS_FIXED_WIDTH( slot->face ) ||
- ( af_face_globals_is_digit( loader->globals, glyph_index ) &&
- metrics->digits_have_same_width ) )
+ if ( scaler->render_mode != FT_RENDER_MODE_LIGHT &&
+ ( FT_IS_FIXED_WIDTH( slot->face ) ||
+ ( af_face_globals_is_digit( loader->globals, glyph_index ) &&
+ metrics->digits_have_same_width ) ) )
{
slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
metrics->scaler.x_scale );
@@ -465,7 +466,13 @@
if ( error )
goto Exit;
- slot->outline = internal->loader->base.outline;
+ /* reassign all outline fields except flags to protect them */
+ slot->outline.n_contours = internal->loader->base.outline.n_contours;
+ slot->outline.n_points = internal->loader->base.outline.n_points;
+ slot->outline.points = internal->loader->base.outline.points;
+ slot->outline.tags = internal->loader->base.outline.tags;
+ slot->outline.contours = internal->loader->base.outline.contours;
+
slot->format = FT_GLYPH_FORMAT_OUTLINE;
}
@@ -480,7 +487,7 @@
af_loader_load_glyph( AF_Loader loader,
FT_Face face,
FT_UInt gindex,
- FT_UInt32 load_flags )
+ FT_Int32 load_flags )
{
FT_Error error;
FT_Size size = face->size;