* src/pfr/pfrobjs.c (pfr_slot_load): fixed a small bug that returned incorrect advances when the outline resolution was different from the metrics resolution * src/autohint/ahhint.c: removing compiler warnings * src/autohint/ahglyph.c: slight improvements to the serif detection code. More work is needed though..
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
diff --git a/ChangeLog b/ChangeLog
index f81ff22..cefe642 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2002-07-04 David Turner <david@freetype.org>
+
+ * src/pfr/pfrobjs.c (pfr_slot_load): fixed a small bug that returned
+ incorrect advances when the outline resolution was different from the
+ metrics resolution
+
+ * src/autohint/ahhint.c: removing compiler warnings
+
+ * src/autohint/ahglyph.c: slight improvements to the serif detection
+ code. More work is needed though..
+
2002-07-03 David Turner <david@freetype.org>
* src/autohint/ahglobal.c, src/autohint/ahtypes.h, src/autohint/ahhint.c:
diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c
index da63259..2439c20 100644
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -984,19 +984,19 @@
max = seg2->max_coord;
len = max - min;
- dist = seg2->pos - seg1->pos;
- if ( dist < 0 )
- dist = -dist;
-
- if ( len < 8 )
- score = 300*8 + dist - len*3;
- else
- score = dist + 300/len;
-
- if ( score < best_score )
+ if ( len >= 8 )
{
- best_score = score;
- best_segment = seg2;
+ dist = seg2->pos - seg1->pos;
+ if ( dist < 0 )
+ dist = -dist;
+
+ score = dist + 3000/len;
+
+ if ( score < best_score )
+ {
+ best_score = score;
+ best_segment = seg2;
+ }
}
}
}
diff --git a/src/autohint/ahhint.c b/src/autohint/ahhint.c
index 945911c..813f4a4 100644
--- a/src/autohint/ahhint.c
+++ b/src/autohint/ahhint.c
@@ -40,7 +40,7 @@
/*************************************************************************/
/*************************************************************************/
-
+#if 0
/* snap a given width in scaled coordinates to one of the */
/* current standard widths */
static FT_Pos
@@ -86,7 +86,7 @@
return width;
}
-
+#endif
/* compute the snapped width of a given stem */
static FT_Pos
@@ -364,7 +364,6 @@
{
FT_Bool min = 0;
- FT_Pos delta;
if ( !anchor )
{
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index fc76462..69fb7e1 100644
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -277,9 +277,9 @@
advance = FT_MulDiv( advance, em_outline, em_metrics );
if ( face->phy_font.flags & PFR_PHY_VERTICAL )
- metrics->vertAdvance = gchar->advance;
+ metrics->vertAdvance = advance;
else
- metrics->horiAdvance = gchar->advance;
+ metrics->horiAdvance = advance;
slot->root.linearHoriAdvance = metrics->horiAdvance;
slot->root.linearVertAdvance = metrics->vertAdvance;