* src/cff/cffload.c (cff_index_get_pointers): Handle last entry correctly. This fixes Savannah bug #18867. * docs/CHANGES: Document it. Other formatting.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
diff --git a/ChangeLog b/ChangeLog
index 85ca9df..8310079 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,30 @@
+2007-01-25 Werner Lemberg <wl@gnu.org>
+
+ * 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 <david@freetype.org>
- * 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.
+
+
+ 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/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
+ * 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 <wl@gnu.org>
diff --git a/docs/CHANGES b/docs/CHANGES
index f5be848..fc39ebf 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 2f35674..1425d3b 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 9d311de..dbad882 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 2c5b4c0..7343fdd 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 b7a41a1..a8a776e 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;