提交 fca6a0d1 编写于 作者: B Behdad Esfahbod

[GPOS] Remove apply_value() return value

上级 fb3b5ccf
......@@ -35,33 +35,6 @@
typedef SHORT Value;
typedef Value ValueRecord[];
#if 0
struct ValueRecord {
SHORT xPlacement; /* Horizontal adjustment for
* placement--in design units */
SHORT yPlacement; /* Vertical adjustment for
* placement--in design units */
SHORT xAdvance; /* Horizontal adjustment for
* advance--in design units (only used
* for horizontal writing) */
SHORT yAdvance; /* Vertical adjustment for advance--in
* design units (only used for vertical
* writing) */
Offset xPlaDevice; /* Offset to Device table for
* horizontal placement--measured from
* beginning of PosTable (may be NULL) */
Offset yPlaDevice; /* Offset to Device table for vertical
* placement--measured from beginning
* of PosTable (may be NULL) */
Offset xAdvDevice; /* Offset to Device table for
* horizontal advance--measured from
* beginning of PosTable (may be NULL) */
Offset yAdvDevice; /* Offset to Device table for vertical
* advance--measured from beginning of
* PosTable (may be NULL) */
};
#endif
struct ValueFormat : USHORT
{
enum
......@@ -82,10 +55,10 @@ struct ValueFormat : USHORT
return _hb_popcount32 ((unsigned int) *this);
}
const Value* apply_value (hb_ot_layout_t *layout,
const char *base,
const Value *values,
HB_Position glyph_pos) const
const void apply_value (hb_ot_layout_t *layout,
const char *base,
const Value *values,
HB_Position glyph_pos) const
{
unsigned int x_ppem, y_ppem;
hb_16dot16_t x_scale, y_scale;
......@@ -93,7 +66,36 @@ struct ValueFormat : USHORT
unsigned int format = *this;
if (!format)
return values;
return;
/* All fields are options. Only those available advance the value
* pointer. */
#if 0
struct ValueRecord {
SHORT xPlacement; /* Horizontal adjustment for
* placement--in design units */
SHORT yPlacement; /* Vertical adjustment for
* placement--in design units */
SHORT xAdvance; /* Horizontal adjustment for
* advance--in design units (only used
* for horizontal writing) */
SHORT yAdvance; /* Vertical adjustment for advance--in
* design units (only used for vertical
* writing) */
Offset xPlaDevice; /* Offset to Device table for
* horizontal placement--measured from
* beginning of PosTable (may be NULL) */
Offset yPlaDevice; /* Offset to Device table for vertical
* placement--measured from beginning
* of PosTable (may be NULL) */
Offset xAdvDevice; /* Offset to Device table for
* horizontal advance--measured from
* beginning of PosTable (may be NULL) */
Offset yAdvDevice; /* Offset to Device table for vertical
* advance--measured from beginning of
* PosTable (may be NULL) */
};
#endif
x_scale = layout->gpos_info.x_scale;
y_scale = layout->gpos_info.y_scale;
......@@ -121,15 +123,6 @@ struct ValueFormat : USHORT
if (format & yAdvDevice)
glyph_pos->y_advance += (base+*(OffsetTo<Device>*)values++).get_delta (y_ppem) << 6;
}
else
{
if (format & xPlaDevice) values++;
if (format & yPlaDevice) values++;
if (format & xAdvDevice) values++;
if (format & yAdvDevice) values++;
}
return values;
}
};
ASSERT_SIZE (ValueFormat, 2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册