* include/freetype/config/ftstdlib.h (ft_strstr): New wrapper macro for `strstr'. * src/truetype/ttobjs.c (tt_face_init): Use ft_strstr for scanning `trick_names', as suggested by Ivan Nincic.
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
diff --git a/ChangeLog b/ChangeLog
index 017c412..2cd3b2d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-03-05 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftstdlib.h (ft_strstr): New wrapper
+ macro for `strstr'.
+
+ * src/truetype/ttobjs.c (tt_face_init): Use ft_strstr for scanning
+ `trick_names', as suggested by Ivan Nincic.
+
2007-03-05 David Turner <david@freetype.org>
* src/base/ftinit.c (FT_Init_FreeType): fixed a small memory leak
diff --git a/include/freetype/config/ftstdlib.h b/include/freetype/config/ftstdlib.h
index 970a50f..82702d3 100644
--- a/include/freetype/config/ftstdlib.h
+++ b/include/freetype/config/ftstdlib.h
@@ -5,7 +5,7 @@
/* ANSI-specific library and header configuration file (specification */
/* only). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -101,6 +101,7 @@
#define ft_strncmp strncmp
#define ft_strncpy strncpy
#define ft_strrchr strrchr
+#define ft_strstr strstr
/**********************************************************************/
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index e466e93..4fce36f 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -479,7 +479,7 @@
if ( dim == AF_DIMENSION_HORZ )
{
if ( fitted < scaled )
- scale -= scale/50; /* x_scale = x_scale*0.98 */
+ scale -= scale / 50; /* scale *= 0.98 */
}
else
{
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index a22b80f..505d95c 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -2220,11 +2220,11 @@
PSH_Dimension dim_x = &glyph->globals->dimension[0];
PSH_Dimension dim_y = &glyph->globals->dimension[1];
- FT_Fixed x_scale = dim_x->scale_mult;
- FT_Fixed y_scale = dim_y->scale_mult;
+ FT_Fixed x_scale = dim_x->scale_mult;
+ FT_Fixed y_scale = dim_y->scale_mult;
- FT_Fixed scaled;
- FT_Fixed fitted;
+ FT_Fixed scaled;
+ FT_Fixed fitted;
scaled = FT_MulFix( globals->blues.normal_top.zones->org_ref, y_scale );
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 8f849dd..a1a1cbb 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -283,8 +283,8 @@
/* be worth to do more checks for a few special cases. */
for ( nn = 0; trick_names[nn] != NULL; nn++ )
{
- if ( ttface->family_name &&
- ft_strcmp( ttface->family_name, trick_names[nn] ) == 0 )
+ if ( ttface->family_name &&
+ ft_strstr( ttface->family_name, trick_names[nn] ) )
{
unpatented_hinting = 1;
break;