ref: b1be9e8b5708716819d46c913dbf7c209351a0aa
parent: 741a17e82bb91131dfdb4d0b65ff89a14eebdb4d
author: Werner Lemberg <[email protected]>
date: Thu Jan 25 06:50:00 EST 2007
* src/cff/cffload.c (cff_index_get_pointers): Handle last entry correctly. This fixes Savannah bug #18867. * docs/CHANGES: Document it. Other formatting.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,30 @@
+2007-01-25 Werner Lemberg <[email protected]>
+
+ * 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 <[email protected]>
- * 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 <[email protected]>
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -5,6 +5,9 @@
- 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.
+
======================================================================
--- 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;
--- 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, */
@@ -240,6 +240,7 @@
#if 1
{
int margin = 16;
+
if ( warper->w0 <= 128 )
{
--- 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, */
--- 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;