[GPOS/kerx] Call into impl namespace from kerx

This commit is contained in:
Behdad Esfahbod 2022-06-28 18:52:27 -06:00
parent 910a137f4e
commit 050f169078
2 changed files with 4 additions and 7 deletions

View File

@ -287,7 +287,7 @@ struct KerxSubTableFormat1
* in the 'kern' table example. */ * in the 'kern' table example. */
if (v == -0x8000) if (v == -0x8000)
{ {
o.attach_type() = ATTACH_TYPE_NONE; o.attach_type() = OT::Layout::GPOS_impl::ATTACH_TYPE_NONE;
o.attach_chain() = 0; o.attach_chain() = 0;
o.y_offset = 0; o.y_offset = 0;
} }
@ -310,7 +310,7 @@ struct KerxSubTableFormat1
/* CoreText doesn't do crossStream kerning in vertical. We do. */ /* CoreText doesn't do crossStream kerning in vertical. We do. */
if (v == -0x8000) if (v == -0x8000)
{ {
o.attach_type() = ATTACH_TYPE_NONE; o.attach_type() = OT::Layout::GPOS_impl::ATTACH_TYPE_NONE;
o.attach_chain() = 0; o.attach_chain() = 0;
o.x_offset = 0; o.x_offset = 0;
} }
@ -567,7 +567,7 @@ struct KerxSubTableFormat4
} }
break; break;
} }
o.attach_type() = ATTACH_TYPE_MARK; o.attach_type() = OT::Layout::GPOS_impl::ATTACH_TYPE_MARK;
o.attach_chain() = (int) mark - (int) buffer->idx; o.attach_chain() = (int) mark - (int) buffer->idx;
buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT; buffer->scratch_flags |= HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT;
} }
@ -901,7 +901,7 @@ struct KerxTable
unsigned int count = c->buffer->len; unsigned int count = c->buffer->len;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
{ {
pos[i].attach_type() = ATTACH_TYPE_CURSIVE; pos[i].attach_type() = OT::Layout::GPOS_impl::ATTACH_TYPE_CURSIVE;
pos[i].attach_chain() = HB_DIRECTION_IS_FORWARD (c->buffer->props.direction) ? -1 : +1; pos[i].attach_chain() = HB_DIRECTION_IS_FORWARD (c->buffer->props.direction) ? -1 : +1;
/* We intentionally don't set HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT, /* We intentionally don't set HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT,
* since there needs to be a non-zero attachment for post-positioning to * since there needs to be a non-zero attachment for post-positioning to

View File

@ -33,9 +33,6 @@
namespace OT { namespace OT {
using Layout::GPOS_impl::ATTACH_TYPE_MARK;
using Layout::GPOS_impl::ATTACH_TYPE_NONE;
using Layout::GPOS_impl::ATTACH_TYPE_CURSIVE;
using Layout::GPOS_impl::PosLookup; using Layout::GPOS_impl::PosLookup;
// TODO(garretrieger): Move into new layout directory. // TODO(garretrieger): Move into new layout directory.