* Attachment List Table
*/
-struct AttachPoint
-{
- ArrayOf<USHORT>
- pointIndex; /* Array of contour point indices--in
+typedef ArrayOf<USHORT> AttachPoint; /* Array of contour point indices--in
* increasing numerical order */
-};
ASSERT_SIZE (AttachPoint, 2);
struct AttachList
{
+ /* XXX We need enumeration API here */
/* const AttachPoint& get_attach_points (hb_codepoint_t glyph); */
DEFINE_INDIRECT_GLYPH_ARRAY_LOOKUP (AttachPoint, attachPoint, get_attach_points);
friend struct CaretValue;
private:
- inline int get_caret_value (int ppem) const
+ inline int get_caret_value (hb_ot_layout_t *layout, hb_codepoint_t glyph_id) const
{
- /* XXX unsigned int */
- return /* TODO garbage */ coordinate / ppem;
+ /* XXX vertical */
+ return layout->gpos_info.x_scale * coordinate / 0x10000;
}
private:
friend struct CaretValue;
private:
- inline int get_caret_value (int ppem) const
+ inline int get_caret_value (hb_ot_layout_t *layout, hb_codepoint_t glyph_id) const
{
- return /* TODO garbage */ 0 / ppem;
+ return /* TODO contour point */ 0;
}
private:
{
friend struct CaretValue;
- inline int get_caret_value (int ppem) const
+ inline int get_caret_value (hb_ot_layout_t *layout, hb_codepoint_t glyph_id) const
{
- return /* TODO garbage */ (coordinate + (this+deviceTable).get_delta (ppem)) / ppem;
+ /* XXX vertical */
+ return layout->gpos_info.x_scale * coordinate / 0x10000 +
+ (this+deviceTable).get_delta (layout->gpos_info.x_ppem) << 6;
}
private:
struct CaretValue
{
/* XXX we need access to a load-contour-point vfunc here */
- int get_caret_value (int ppem) const
+ int get_caret_value (hb_ot_layout_t *layout, hb_codepoint_t glyph_id) const
{
switch (u.format) {
- case 1: return u.format1->get_caret_value(ppem);
- case 2: return u.format2->get_caret_value(ppem);
- case 3: return u.format3->get_caret_value(ppem);
+ case 1: return u.format1->get_caret_value (layout, glyph_id);
+ case 2: return u.format2->get_caret_value (layout, glyph_id);
+ case 3: return u.format3->get_caret_value (layout, glyph_id);
default:return 0;
}
}
private:
OffsetArrayOf<CaretValue>
- caret; /* Array of CaretValue tables
- * in increasing coordinate order */
+ caret; /* Offset rrray of CaretValue tables
+ * --from beginning of LigGlyph table
+ * --in increasing coordinate order */
};
ASSERT_SIZE (LigGlyph, 2);