Add info_cc() convenience macro
This commit is contained in:
parent
7f9e7f8689
commit
b6fe0ab636
|
@ -347,6 +347,8 @@ _hb_glyph_info_get_modified_combining_class (const hb_glyph_info_t *info)
|
||||||
return _hb_glyph_info_is_unicode_mark (info) ? info->unicode_props()>>8 : 0;
|
return _hb_glyph_info_is_unicode_mark (info) ? info->unicode_props()>>8 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define info_cc(info) (_hb_glyph_info_get_modified_combining_class (&(info)))
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
_hb_glyph_info_is_unicode_space (const hb_glyph_info_t *info)
|
_hb_glyph_info_is_unicode_space (const hb_glyph_info_t *info)
|
||||||
{
|
{
|
||||||
|
|
|
@ -384,7 +384,7 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
|
||||||
if (/* If there's anything between the starter and this char, they should have CCC
|
if (/* If there's anything between the starter and this char, they should have CCC
|
||||||
* smaller than this character's. */
|
* smaller than this character's. */
|
||||||
(starter == buffer->out_len - 1 ||
|
(starter == buffer->out_len - 1 ||
|
||||||
_hb_glyph_info_get_modified_combining_class (&buffer->prev()) < _hb_glyph_info_get_modified_combining_class (&buffer->cur())) &&
|
info_cc (buffer->prev()) < info_cc (buffer->cur())) &&
|
||||||
/* And compose. */
|
/* And compose. */
|
||||||
c.compose (&c,
|
c.compose (&c,
|
||||||
buffer->out_info[starter].codepoint,
|
buffer->out_info[starter].codepoint,
|
||||||
|
@ -409,14 +409,14 @@ _hb_ot_shape_normalize (const hb_ot_shape_plan_t *plan,
|
||||||
else if (/* We sometimes custom-tailor the sorted order of marks. In that case, stop
|
else if (/* We sometimes custom-tailor the sorted order of marks. In that case, stop
|
||||||
* trying to combine as soon as combining-class drops. */
|
* trying to combine as soon as combining-class drops. */
|
||||||
starter < buffer->out_len - 1 &&
|
starter < buffer->out_len - 1 &&
|
||||||
_hb_glyph_info_get_modified_combining_class (&buffer->prev()) > _hb_glyph_info_get_modified_combining_class (&buffer->cur()))
|
info_cc (buffer->prev()) > info_cc (buffer->cur()))
|
||||||
combine = false;
|
combine = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Blocked, or doesn't compose. */
|
/* Blocked, or doesn't compose. */
|
||||||
buffer->next_glyph ();
|
buffer->next_glyph ();
|
||||||
|
|
||||||
if (_hb_glyph_info_get_modified_combining_class (&buffer->prev()) == 0)
|
if (info_cc (buffer->prev()) == 0)
|
||||||
{
|
{
|
||||||
starter = buffer->out_len - 1;
|
starter = buffer->out_len - 1;
|
||||||
combine = true;
|
combine = true;
|
||||||
|
|
Loading…
Reference in New Issue