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 <jiang.jiang@nokia.com> Reviewed-by: Adrian Yanes <ext-adrian.yanes@nokia.com>
This commit is contained in:
parent
7165e68033
commit
5234e901be
9
src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
vendored
9
src/3rdparty/harfbuzz/src/harfbuzz-gpos.c
vendored
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user