Move buffer var allocation local
This commit is contained in:
parent
1e7c1fcbc3
commit
194d4566ec
|
@ -34,6 +34,11 @@
|
||||||
HB_BEGIN_DECLS
|
HB_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
|
/* buffer var allocations */
|
||||||
|
#define attach_lookback() var.u16[0] /* number of glyphs to go back to attach this glyph to its base */
|
||||||
|
#define cursive_chain() var.i16[1] /* character to which this connects, may be positive or negative */
|
||||||
|
|
||||||
|
|
||||||
/* Shared Tables: ValueRecord, Anchor Table, and MarkArray */
|
/* Shared Tables: ValueRecord, Anchor Table, and MarkArray */
|
||||||
|
|
||||||
typedef USHORT Value;
|
typedef USHORT Value;
|
||||||
|
@ -402,9 +407,9 @@ struct MarkArray : ArrayOf<MarkRecord> /* Array of MarkRecords--in Coverage orde
|
||||||
glyph_anchor.get_anchor (c->layout, c->buffer->info[glyph_pos].codepoint, &base_x, &base_y);
|
glyph_anchor.get_anchor (c->layout, c->buffer->info[glyph_pos].codepoint, &base_x, &base_y);
|
||||||
|
|
||||||
hb_glyph_position_t &o = c->buffer->pos[c->buffer->i];
|
hb_glyph_position_t &o = c->buffer->pos[c->buffer->i];
|
||||||
o.x_offset = base_x - mark_x;
|
o.x_offset = base_x - mark_x;
|
||||||
o.y_offset = base_y - mark_y;
|
o.y_offset = base_y - mark_y;
|
||||||
o.back() = c->buffer->i - glyph_pos;
|
o.attach_lookback() = c->buffer->i - glyph_pos;
|
||||||
|
|
||||||
c->buffer->i++;
|
c->buffer->i++;
|
||||||
return true;
|
return true;
|
||||||
|
@ -1522,9 +1527,9 @@ GPOS::position_finish (hb_buffer_t *buffer)
|
||||||
|
|
||||||
/* Handle attachments */
|
/* Handle attachments */
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
if (pos[i].back())
|
if (pos[i].attach_lookback())
|
||||||
{
|
{
|
||||||
unsigned int back = i - pos[i].back();
|
unsigned int back = i - pos[i].attach_lookback();
|
||||||
pos[i].x_offset += pos[back].x_offset;
|
pos[i].x_offset += pos[back].x_offset;
|
||||||
pos[i].y_offset += pos[back].y_offset;
|
pos[i].y_offset += pos[back].y_offset;
|
||||||
|
|
||||||
|
@ -1574,6 +1579,10 @@ static inline bool position_lookup (hb_apply_context_t *c, unsigned int lookup_i
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#undef attach_lookback
|
||||||
|
#undef cursive_chain
|
||||||
|
|
||||||
|
|
||||||
HB_END_DECLS
|
HB_END_DECLS
|
||||||
|
|
||||||
#endif /* HB_OT_LAYOUT_GPOS_PRIVATE_HH */
|
#endif /* HB_OT_LAYOUT_GPOS_PRIVATE_HH */
|
||||||
|
|
|
@ -42,8 +42,6 @@ HB_BEGIN_DECLS
|
||||||
#define component() var1.u16[0]
|
#define component() var1.u16[0]
|
||||||
#define lig_id() var1.u16[1]
|
#define lig_id() var1.u16[1]
|
||||||
#define gproperty() var2.u32
|
#define gproperty() var2.u32
|
||||||
#define back() var.u16[0] /* number of glyphs to go back for drawing current glyph */
|
|
||||||
#define cursive_chain() var.i16[1] /* character to which this connects, may be positive or negative */
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0x0001,
|
HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0x0001,
|
||||||
|
|
Loading…
Reference in New Issue