* src/pshinter/pshalgo3.c, src/base/ftobjs.c, src/base/ftobject.c, src/autohint/ahglyph.c, include/freetype/freetype.h: fixing typos and removing compiler warnings
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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
diff --git a/ChangeLog b/ChangeLog
index dbff64a..8bdd4ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,9 @@
this should only break binary and/or source compatibility on
16-bit platforms (Atari?)
+ * src/pshinter/pshalgo3.c, src/base/ftobjs.c, src/base/ftobject.c,
+ src/autohint/ahglyph.c, include/freetype/freetype.h: fixing typos
+ and removing compiler warnings
2002-08-20 Werner Lemberg <wl@gnu.org>
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index cd4c363..6293a01 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -2043,6 +2043,8 @@ FT_BEGIN_HEADER
/* the function should try to auto-hint the glyphs, even if a driver */
/* specific hinter is available. */
/* */
+ /* Note that it is ignored if @FT_LOAD_NO_AUTOHINT is also set */
+ /* */
#define FT_LOAD_FORCE_AUTOHINT 32
@@ -2154,6 +2156,28 @@ FT_BEGIN_HEADER
/* temporary hack! */
#define FT_LOAD_SBITS_ONLY 16384
+ /*************************************************************************/
+ /* */
+ /* <Constant> */
+ /* FT_LOAD_NO_AUTOHINT */
+ /* */
+ /* <Description> */
+ /* A bit field constant, used with @FT_Load_Glyph to indicate that */
+ /* the auto-hinter should never be run. This can be important for */
+ /* certain fonts where un-hinted output is better than auto-hinted */
+ /* one. */
+ /* */
+ /* Note that this will _not_ prevent a native hinter to be run */
+ /* when available (i.e. for Postscript fonts, or for TrueType ones */
+ /* when the bytecode interpreter was compiled in) */
+ /* */
+ /* If you want to completely disable hinting, use @FT_LOAD_NO_HINTING */
+ /* instead. */
+ /* */
+ /* The @FT_LOAD_FORCE_AUTOHINT flag will not work if this flag is set */
+ /* */
+#define FT_LOAD_NO_AUTOHINT 32768
+
/*************************************************************************/
/* */
diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c
index 8939b74..601cf46 100644
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -760,7 +760,7 @@
diff_out = ah_angle_diff( angle_seg, angle_out );
- if ( diff_in ^ diff_out < 0 )
+ if ( ( diff_in ^ diff_out ) < 0 )
{
/* diff_in and diff_out have different signs, we have */
/* inflection points here... */
diff --git a/src/base/ftobject.c b/src/base/ftobject.c
index 413384c..1a5d68e 100644
--- a/src/base/ftobject.c
+++ b/src/base/ftobject.c
@@ -1,5 +1,6 @@
#include <ft2build.h>
#include FT_INTERNAL_OBJECT_H
+#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_OBJECTS_H
#define FT_MAGIC_DEATH 0xDEADdead
@@ -13,6 +14,10 @@
FT_OBJECT(o)->ref_count >= 1 && \
FT_OBJECT(o)->clazz->magic == FT_MAGIC_CLASS )
+#define FT_CLASS_CHECK(c) \
+ ( FT_CLASS(c) != NULL && FT_CLASS(c)->magic == FT_MAGIC_CLASS )
+
+#define FT_ASSERT_IS_CLASS(c) FT_ASSERT( FT_CLASS_CHECK(c) )
/*******************************************************************/
/*******************************************************************/
@@ -34,7 +39,6 @@
{
FT_Class clazz = node->clazz;
FT_Memory memory = clazz->memory;
- FT_Type ctype = clazz->type;
if ( clazz->class_done )
clazz->class_done( (FT_Object) clazz );
@@ -61,9 +65,9 @@
/* compare parent types */
if ( type1->super != type2->super )
{
- if ( type1->super == NULL ||
- type2->super == NULL ||
- !ft_type_compare( type1, type2 ) )
+ if ( type1->super == NULL ||
+ type2->super == NULL ||
+ !ft_type_equal( type1, type2 ) )
goto Fail;
}
@@ -298,7 +302,6 @@
{
if ( FT_OBJECT_CHECK(obj) )
{
- FT_Object o = FT_OBJECT(obj);
FT_Class c = FT_OBJECT__CLASS(obj);
do
@@ -327,7 +330,7 @@
FT_ASSERT_IS_CLASS(clazz);
- memory = FT_CLASS__MEMORY(memory);
+ memory = FT_CLASS__MEMORY(clazz);
if ( !FT_ALLOC( obj, clazz->obj_size ) )
{
obj->clazz = clazz;
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 5786b6c..59ac1b8 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -443,10 +443,12 @@
library = driver->root.library;
hinter = library->auto_hinter;
autohint =
- FT_BOOL( hinter &&
- !( load_flags & ( FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING ) ) &&
- FT_DRIVER_IS_SCALABLE( driver ) &&
- FT_DRIVER_USES_OUTLINES( driver ) );
+ FT_BOOL( hinter &&
+ !( load_flags & ( FT_LOAD_NO_SCALE |
+ FT_LOAD_NO_HINTING |
+ FT_LOAD_NO_AUTOHINT ) ) &&
+ FT_DRIVER_IS_SCALABLE( driver ) &&
+ FT_DRIVER_USES_OUTLINES( driver ) );
if ( autohint )
{
if ( FT_DRIVER_HAS_HINTER( driver ) &&
diff --git a/src/pshinter/pshalgo3.c b/src/pshinter/pshalgo3.c
index 18ea48d..59b4d5a 100644
--- a/src/pshinter/pshalgo3.c
+++ b/src/pshinter/pshalgo3.c
@@ -738,7 +738,7 @@
diff_out = FT_Angle_Diff( angle_seg, angle_out );
- if ( diff_in ^ diff_out < 0 )
+ if ( ( diff_in ^ diff_out ) < 0 )
{
/* diff_in and diff_out have different signs, we have */
/* inflection points here... */
@@ -1043,9 +1043,7 @@
static void
psh3_glyph_compute_extrema( PSH3_Glyph glyph )
{
- FT_UInt first = 0, next, n;
- PSH3_Point points = glyph->points;
- PSH3_Contour contour = glyph->contours;
+ FT_UInt n;
/* first of all, compute all local extrema */
for ( n = 0; n < glyph->num_contours; n++ )
@@ -1116,12 +1114,12 @@
{
PSH3_Point point, before, after;
- point = &glyph->points[n];
+ point = &glyph->points[n];
+ before = point;
+ after = point;
+
if ( psh3_point_is_extremum( point ) )
{
- PSH3_Point before = point;
- PSH3_Point after = point;
-
do
{
before = before->prev;
@@ -1172,7 +1170,6 @@
PSH3_Hint* sort = table->sort;
FT_UInt num_hints = table->num_hints;
FT_Int point_dir = 0;
- FT_UInt flag;
if ( PSH3_DIR_COMPARE( point->dir_in, major_dir ) )
point_dir = point->dir_in;