[gdef] minor, use dagger in ligature carets fetch

This commit is contained in:
Ebrahim Byagowi 2020-05-23 12:38:07 +04:30
parent 2264a7011f
commit 1fbb788326
1 changed files with 15 additions and 14 deletions

View File

@ -263,20 +263,21 @@ struct CaretValue
struct LigGlyph
{
unsigned int get_lig_carets (hb_font_t *font,
unsigned get_lig_carets (hb_font_t *font,
hb_direction_t direction,
hb_codepoint_t glyph_id,
const VariationStore &var_store,
unsigned int start_offset,
unsigned int *caret_count /* IN/OUT */,
unsigned start_offset,
unsigned *caret_count /* IN/OUT */,
hb_position_t *caret_array /* OUT */) const
{
if (caret_count)
{
hb_array_t <const OffsetTo<CaretValue>> array = carets.sub_array (start_offset, caret_count);
unsigned int count = array.length;
for (unsigned int i = 0; i < count; i++)
caret_array[i] = (this+array[i]).get_caret_value (font, direction, glyph_id, var_store);
+ carets.sub_array (start_offset, caret_count)
| hb_map (hb_add (this))
| hb_map ([&] (const CaretValue &value) { return value.get_caret_value (font, direction, glyph_id, var_store); })
| hb_sink (hb_array (caret_array, *caret_count))
;
}
return carets.len;