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
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;
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;
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);