Move things around some more
This commit is contained in:
parent
194d4566ec
commit
c2709119c8
|
@ -1100,9 +1100,9 @@ struct MarkLigPosFormat1
|
|||
* is identical to the ligature ID of the found ligature. If yes, we
|
||||
* can directly use the component index. If not, we attach the mark
|
||||
* glyph to the last component of the ligature. */
|
||||
if (c->buffer->info[j].lig_id() && c->buffer->info[j].lig_id() == c->buffer->info[c->buffer->i].lig_id() && c->buffer->info[c->buffer->i].component())
|
||||
if (c->buffer->info[j].lig_id() && c->buffer->info[j].lig_id() == c->buffer->info[c->buffer->i].lig_id() && c->buffer->info[c->buffer->i].lig_comp())
|
||||
{
|
||||
comp_index = c->buffer->info[c->buffer->i].component() - 1;
|
||||
comp_index = c->buffer->info[c->buffer->i].lig_comp() - 1;
|
||||
if (comp_index >= comp_count)
|
||||
comp_index = comp_count - 1;
|
||||
}
|
||||
|
@ -1205,8 +1205,8 @@ struct MarkMarkPosFormat1
|
|||
/* Two marks match only if they belong to the same base, or same component
|
||||
* of the same ligature. That is, the component numbers must match, and
|
||||
* if those are non-zero, the ligid number should also match. */
|
||||
if ((c->buffer->info[j].component() != c->buffer->info[c->buffer->i].component()) ||
|
||||
(c->buffer->info[j].component() && c->buffer->info[j].lig_id() != c->buffer->info[c->buffer->i].lig_id()))
|
||||
if ((c->buffer->info[j].lig_comp() != c->buffer->info[c->buffer->i].lig_comp()) ||
|
||||
(c->buffer->info[j].lig_comp() && c->buffer->info[j].lig_id() != c->buffer->info[c->buffer->i].lig_id()))
|
||||
return false;
|
||||
|
||||
unsigned int mark2_index = (this+mark2Coverage) (c->buffer->info[j].codepoint);
|
||||
|
|
|
@ -372,7 +372,7 @@ struct Ligature
|
|||
|
||||
/* Allocate new ligature id */
|
||||
unsigned int lig_id = allocate_lig_id (c->buffer);
|
||||
c->buffer->info[c->buffer->i].component() = 0;
|
||||
c->buffer->info[c->buffer->i].lig_comp() = 0;
|
||||
c->buffer->info[c->buffer->i].lig_id() = lig_id;
|
||||
|
||||
if (j == c->buffer->i + i) /* No input glyphs skipped */
|
||||
|
@ -394,7 +394,7 @@ struct Ligature
|
|||
{
|
||||
while (_hb_ot_layout_skip_mark (c->layout->face, &c->buffer->info[c->buffer->i], c->lookup_props, NULL))
|
||||
{
|
||||
c->buffer->info[c->buffer->i].component() = i;
|
||||
c->buffer->info[c->buffer->i].lig_comp() = i;
|
||||
c->buffer->info[c->buffer->i].lig_id() = lig_id;
|
||||
c->replace_glyph (c->buffer->info[c->buffer->i].codepoint);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,11 @@
|
|||
HB_BEGIN_DECLS
|
||||
|
||||
|
||||
/* buffer var allocations */
|
||||
#define lig_id() var2.u16[0] /* unique ligature id */
|
||||
#define lig_comp() var2.u16[1] /* component number in the ligature (0 = base) */
|
||||
|
||||
|
||||
#ifndef HB_DEBUG_APPLY
|
||||
#define HB_DEBUG_APPLY HB_DEBUG+0
|
||||
#endif
|
||||
|
@ -72,13 +77,13 @@ struct hb_apply_context_t
|
|||
|
||||
inline void guess_glyph_class (unsigned int klass)
|
||||
{
|
||||
// buffer->info[buffer->i].gproperty() = klass;
|
||||
// buffer->info[buffer->i].props_cache() = klass;
|
||||
}
|
||||
|
||||
private:
|
||||
inline void clear_property (void) const
|
||||
{
|
||||
buffer->info[buffer->i].gproperty() = 0;
|
||||
buffer->info[buffer->i].props_cache() = 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -38,10 +38,9 @@
|
|||
HB_BEGIN_DECLS
|
||||
|
||||
|
||||
/* XXX */
|
||||
#define component() var1.u16[0]
|
||||
#define lig_id() var1.u16[1]
|
||||
#define gproperty() var2.u32
|
||||
/* buffer var allocations */
|
||||
#define props_cache() var1.u16[0] /* glyph_props cache */
|
||||
|
||||
|
||||
typedef enum {
|
||||
HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0x0001,
|
||||
|
|
|
@ -106,13 +106,13 @@ unsigned int
|
|||
_hb_ot_layout_get_glyph_property (hb_face_t *face,
|
||||
hb_glyph_info_t *info)
|
||||
{
|
||||
if (!info->gproperty())
|
||||
if (!info->props_cache())
|
||||
{
|
||||
const GDEF &gdef = _get_gdef (face);
|
||||
info->gproperty() = gdef.get_glyph_props (info->codepoint);
|
||||
info->props_cache() = gdef.get_glyph_props (info->codepoint);
|
||||
}
|
||||
|
||||
return info->gproperty();
|
||||
return info->props_cache();
|
||||
}
|
||||
|
||||
hb_bool_t
|
||||
|
|
Loading…
Reference in New Issue