From bfcc375b06e26cb85e7a74b51f8d1e7915ca7457 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 6 Feb 2013 08:47:29 +0100 Subject: [PATCH] * src/truetype/ttobjs.c (tt_size_run_prep): Reset reference points. Up to now, we simply took a snapshot of the Graphics State after the `prep' table has been executed, and right before a glyph's bytecode was run it got reloaded. However, as Greg Hitchcock has told us in private communication, reference points get reset to zero in the MS rasterizer and we follow in due course. While reasonable, this is undocumented behaviour. Most notably, this fixes the rendering of Arial's `x' glyph in subpixel hinting mode. --- ChangeLog | 14 ++++++++++++++ src/truetype/ttobjs.c | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9e7b6bb8d..f78667dc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2013-02-06 Werner Lemberg + + * src/truetype/ttobjs.c (tt_size_run_prep): Reset reference points. + + Up to now, we simply took a snapshot of the Graphics State after the + `prep' table has been executed, and right before a glyph's bytecode + was run it got reloaded. However, as Greg Hitchcock has told us in + private communication, reference points get reset to zero in the MS + rasterizer and we follow in due course. While reasonable, this is + undocumented behaviour. + + Most notably, this fixes the rendering of Arial's `x' glyph in + subpixel hinting mode. + 2013-02-05 Werner Lemberg [truetype] A better fix for Savannah bug #38211. diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c index ca4a377ee..9b828c3ba 100644 --- a/src/truetype/ttobjs.c +++ b/src/truetype/ttobjs.c @@ -878,6 +878,11 @@ else error = TT_Err_Ok; + /* UNDOCUMENTED! Reference points are reset to zero. */ + exec->GS.rp0 = 0; + exec->GS.rp1 = 0; + exec->GS.rp2 = 0; + /* save as default graphics state */ size->GS = exec->GS;