summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2011-01-18 07:35:26 +0100
committerWerner Lemberg <wl@gnu.org>2011-01-18 07:35:26 +0100
commitdcdb3167dcd4bd3ffc98b47062109e6b2fca1272 (patch)
treebfb93ad8fcd23fac5200bcd40f578e51c4e572b4
parent17f54bc66c514f9fd9aad7952d0f768b30ef1466 (diff)
[truetype] Fix handling of MIRP instruction.
Thanks to Greg Hitchcock who explained the issue. * src/truetype/ttinterp.c (Ins_MIRP): Replace a `>=' operator with `>' since the description in the specification is incorrect. This fixes, for example, glyph `two' in font `Helvetica Neue LT Com 65 medium' at 15ppem.
-rw-r--r--ChangeLog11
-rw-r--r--src/truetype/ttinterp.c16
2 files changed, 26 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 51dd7eea..07a6eee7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-01-18 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Fix handling of MIRP instruction.
+
+ Thanks to Greg Hitchcock who explained the issue.
+
+ * src/truetype/ttinterp.c (Ins_MIRP): Replace a `>=' operator with
+ `>' since the description in the specification is incorrect.
+ This fixes, for example, glyph `two' in font `Helvetica Neue LT Com
+ 65 medium' at 15ppem.
+
2011-01-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Fix ARM assembly code in include/freetype/config/ftconfig.h.
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index f55b8eea..2ae7a4d6 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -6244,8 +6244,22 @@
/* refer to the same zone. */
if ( CUR.GS.gep0 == CUR.GS.gep1 )
- if ( FT_ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin )
+ {
+ /* XXX: According to Greg Hitchcock, the following wording is */
+ /* the right one: */
+ /* */
+ /* When the absolute difference between the value in */
+ /* the table [CVT] and the measurement directly from */
+ /* the outline is _greater_ than the cut_in value, the */
+ /* outline measurement is used. */
+ /* */
+ /* This is from `instgly.doc'. The description in */
+ /* `ttinst2.doc', version 1.66, is thus incorrect since */
+ /* it implies `>=' instead of `>'. */
+
+ if ( FT_ABS( cvt_dist - org_dist ) > CUR.GS.control_value_cutin )
cvt_dist = org_dist;
+ }
distance = CUR_Func_round(
cvt_dist,