diff --git a/ChangeLog b/ChangeLog index 85ca9df22..83100798f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,30 @@ +2007-01-25 Werner Lemberg + + * src/cff/cffload.c (cff_index_get_pointers): Handle last entry + correctly. This fixes Savannah bug #18867. + + * docs/CHANGES: Document it. + 2007-01-23 David Turner - * src/truetype/ttobjs.c: fixed typo that prevented compilation when - disabling both the unpatented and the bytecode interpreter in the - TrueType font driver + * src/truetype/ttobjs.c (tt_size_ready_bytecode): Fix typo that + prevented compilation when disabling both the unpatented and the + bytecode interpreter in the TrueType font driver. - * src/autofit/aflatin.c, src/autofit/aftypes.h, src/autofit/afwarp.h, - src/autofit/afwarp.c: fix and enable the warper to improve "light" - hinting mode. This is not necessarily a final version, but it seems - to work well + + Fix and enable the warper to improve `light' hinting mode. This is + not necessarily a final version, but it seems to work well. + + * src/autofit/aflatin.c (af_latin_hints_init) [AF_USE_WARPER]: + Disable code. + (af_latin_hints_apply) [AF_USE_WARPER]: Handle FT_RENDER_MODE_LIGHT. + * src/autofit/aftypes.h: Activate AF_USE_WARPER. + + * src/autofit/afwarp.c (AF_WarpScore): Tune table. + (af_warper_compute_line_best): Fix array size of `scores'. + (af_warper_compute): Better handling of border cases. + * src/autofit/afwarp.h (AF_WarperRec): Remove unused members `X1' + and `X2'. 2007-01-21 Werner Lemberg diff --git a/docs/CHANGES b/docs/CHANGES index f5be8481e..fc39ebfee 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -5,6 +5,9 @@ CHANGES BETWEEN 2.3.0 and 2.3.1 - The TrueType interpreter sometimes returned incorrect horizontal metrics due to a bug in the handling of the SHZ instruction. + - A typo in a security check introduced after version 2.2.1 + prevented FreeType to render some glyphs in CFF fonts. + ====================================================================== diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index 2f3567483..1425d3ba8 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -1385,8 +1385,8 @@ af_glyph_hints_rescale( hints, (AF_ScriptMetrics)metrics ); /* - * correct x_scale and y_scale when needed, since they may have - * been modified af_latin_scale_dim above + * correct x_scale and y_scale if needed, since they may have + * been modified `af_latin_metrics_scale_dim' above */ hints->x_scale = metrics->axis[AF_DIMENSION_HORZ].scale; hints->x_delta = metrics->axis[AF_DIMENSION_HORZ].delta; @@ -1396,7 +1396,7 @@ /* compute flags depending on render mode, etc. */ mode = metrics->root.scaler.render_mode; -#ifdef zzAF_USE_WARPER +#if 0 /* #ifdef AF_USE_WARPER */ if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V ) { metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL; diff --git a/src/autofit/afwarp.c b/src/autofit/afwarp.c index 9d311de67..dbad88218 100644 --- a/src/autofit/afwarp.c +++ b/src/autofit/afwarp.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter warping algorithm (body). */ /* */ -/* Copyright 2006 by */ +/* Copyright 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -241,6 +241,7 @@ { int margin = 16; + if ( warper->w0 <= 128 ) { margin = 8; diff --git a/src/autofit/afwarp.h b/src/autofit/afwarp.h index 2c5b4c04a..7343fdd5e 100644 --- a/src/autofit/afwarp.h +++ b/src/autofit/afwarp.h @@ -4,7 +4,7 @@ /* */ /* Auto-fitter warping algorithm (specification). */ /* */ -/* Copyright 2006 by */ +/* Copyright 2006, 2007 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/cff/cffload.c b/src/cff/cffload.c index b7a41a14e..a8a776ecf 100644 --- a/src/cff/cffload.c +++ b/src/cff/cffload.c @@ -404,7 +404,8 @@ offset = old_offset; /* sanity check for invalid offset tables */ - else if ( offset < old_offset || offset - 1 >= idx->data_size ) + else if ( offset < old_offset || + offset - 1 > idx->data_size ) offset = old_offset; t[n] = idx->bytes + offset - 1;