From b861b54178289e589289d3fbda6c52f94a383e93 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 12 Mar 2025 20:51:18 -0600 Subject: [PATCH] [kerx] Cosmetic --- src/hb-aat-layout-kerx-table.hh | 12 ++++++------ src/hb-aat-layout-morx-table.hh | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh index d47f01a6d..fbf0d39ca 100644 --- a/src/hb-aat-layout-kerx-table.hh +++ b/src/hb-aat-layout-kerx-table.hh @@ -328,8 +328,9 @@ struct KerxSubTableFormat1 } else if (buffer->info[idx].mask & kern_mask) { - o.x_advance += c->font->em_scale_x (v); - o.x_offset += c->font->em_scale_x (v); + auto scaled = c->font->em_scale_x (v); + o.x_advance += scaled; + o.x_offset += scaled; } } else @@ -1010,7 +1011,10 @@ struct KerxTable if (HB_DIRECTION_IS_HORIZONTAL (c->buffer->props.direction) != st->u.header.is_horizontal ()) goto skip; + c->left_set = &accel_data[i].left_set; + c->right_set = &accel_data[i].right_set; c->machine_glyph_set = &accel_data[i].left_set; + c->machine_class_cache = &accel_data[i].class_cache; if (!c->buffer_intersects_machine ()) { @@ -1044,10 +1048,6 @@ struct KerxTable if (reverse) c->buffer->reverse (); - c->left_set = &accel_data[i].left_set; - c->right_set = &accel_data[i].right_set; - c->machine_class_cache = &accel_data[i].class_cache; - { /* See comment in sanitize() for conditional here. */ hb_sanitize_with_object_t with (&c->sanitizer, i < count - 1 ? st : (const SubTable *) nullptr); diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index 0a99e8f4f..7aa820e33 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -1168,6 +1168,7 @@ struct Chain if (hb_none (hb_iter (c->range_flags) | hb_map ([subtable_flags] (const hb_aat_map_t::range_flags_t _) -> bool { return subtable_flags & (_.flags); }))) goto skip; + c->subtable_flags = subtable_flags; c->machine_glyph_set = accel ? &accel->subtables[i].glyph_set : &Null(hb_bit_set_t); c->machine_class_cache = accel ? &accel->subtables[i].class_cache : nullptr;