[GPOS] Fix PairPos signedness

This commit is contained in:
Behdad Esfahbod 2009-05-26 18:57:56 -04:00
parent 80ea5bd10e
commit 64e33f008f
1 changed files with 4 additions and 7 deletions

View File

@ -101,13 +101,13 @@ struct ValueRecord {
y_scale = layout->gpos_info.y_scale; y_scale = layout->gpos_info.y_scale;
/* design units -> fractional pixel */ /* design units -> fractional pixel */
if (format & xPlacement) if (format & xPlacement)
glyph_pos->x_pos += x_scale * *(USHORT*)values++ / 0x10000; glyph_pos->x_pos += x_scale * *(SHORT*)values++ / 0x10000;
if (format & yPlacement) if (format & yPlacement)
glyph_pos->y_pos += y_scale * *(USHORT*)values++ / 0x10000; glyph_pos->y_pos += y_scale * *(SHORT*)values++ / 0x10000;
if (format & xAdvance) if (format & xAdvance)
glyph_pos->x_advance += x_scale * *(USHORT*)values++ / 0x10000; glyph_pos->x_advance += x_scale * *(SHORT*)values++ / 0x10000;
if (format & yAdvance) if (format & yAdvance)
glyph_pos->y_advance += y_scale * *(USHORT*)values++ / 0x10000; glyph_pos->y_advance += y_scale * *(SHORT*)values++ / 0x10000;
if (HB_LIKELY (!layout->gpos_info.dvi)) if (HB_LIKELY (!layout->gpos_info.dvi))
{ {
@ -356,7 +356,6 @@ struct PairSet
private: private:
USHORT len; /* Number of PairValueRecords */ USHORT len; /* Number of PairValueRecords */
/* XXX */
PairValueRecord PairValueRecord
array[]; /* Array of PairValueRecords--ordered array[]; /* Array of PairValueRecords--ordered
* by GlyphID of the second glyph */ * by GlyphID of the second glyph */
@ -784,7 +783,6 @@ struct MarkBasePosFormat1
return false; return false;
i++, j--; i++, j--;
} }
#if 0 #if 0
/* The following assertion is too strong. */ /* The following assertion is too strong. */
if (!(property & HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH)) if (!(property & HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH))
@ -903,7 +901,6 @@ struct MarkLigPosFormat1
return false; return false;
i++, j--; i++, j--;
} }
#if 0 #if 0
/* The following assertion is too strong. */ /* The following assertion is too strong. */
if (!(property & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE)) if (!(property & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE))