From 5234e901be550f70134da90ba0c5a89be238a615 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 20 Mar 2012 12:01:22 +0100 Subject: Fix GPOS positioning for some fonts We need to do ACCESS_Frame for each 2 byte frame, otherwise the position of the cursor in the input stream will not be updated by enough, and we will read twice as many pairsets. Depending on the value read for the SecondGlyph in the broken pairsets, we might get strange kerning results. Change-Id: I7fb5a850afe0364b3dd50869d5f36fd14d2f4eaf Reviewed-by: Jiang Jiang Reviewed-by: Adrian Yanes --- src/3rdparty/harfbuzz/src/harfbuzz-gpos.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/3rdparty/harfbuzz') diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c index 217a4fd001..44ed64c520 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c @@ -1187,13 +1187,14 @@ static HB_Error Load_PairSet ( HB_PairSet* ps, for ( n = 0; n < count; n++ ) { - if ( ACCESS_Frame( 2L ) ) - goto Fail; + for ( m = 0; m < record_size; m++ ) { + if ( ACCESS_Frame( 2L ) ) + goto Fail; - for ( m = 0; m < record_size; m++ ) *(vr++) = GET_Short(); - FORGET_Frame(); + FORGET_Frame(); + } } #endif -- cgit v1.2.3