* src/type/t1objs.c (T1_Face_Init): Slightly improve algorithm.
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
diff --git a/ChangeLog b/ChangeLog
index 016f4de..3ee4de6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-06-19 Werner Lemberg <wl@gnu.org>
+
+ * src/type/t1objs.c (T1_Face_Init): Slightly improve algorithm.
+
2008-06-18 Werner Lemberg <wl@gnu.org>
* src/type/t1objs.c (T1_Face_Init): Fix change from 2008-03-21.
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index bc3e2d4..9d00cf3 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -375,6 +375,9 @@
if ( full )
{
+ FT_Bool the_same = TRUE;
+
+
while ( *full )
{
if ( *full == *family )
@@ -390,12 +393,17 @@
family++;
else
{
+ the_same = FALSE;
+
if ( !*family )
root->style_name = full;
break;
}
}
}
+
+ if ( the_same )
+ root->style_name = (char *)"Regular";
}
}
else
@@ -410,7 +418,7 @@
if ( info->weight )
root->style_name = info->weight;
else
- /* assume "Regular" style because we don't know better */
+ /* assume `Regular' style because we don't know better */
root->style_name = (char *)"Regular";
}