[buffer] Return delta from sync_so_far

pull/3495/head
Behdad Esfahbod 3 years ago
parent c55c019771
commit 0722b627f4
  1. 5
      src/hb-buffer.cc
  2. 2
      src/hb-buffer.hh

@ -416,12 +416,13 @@ reset:
return ret;
}
void
int
hb_buffer_t::sync_so_far ()
{
bool had_output = have_output;
unsigned out_i = out_len;
unsigned i = idx;
unsigned old_idx = idx;
if (sync ())
idx = out_i;
@ -435,6 +436,8 @@ hb_buffer_t::sync_so_far ()
}
assert (idx <= len);
return idx - old_idx;
}
bool

@ -289,7 +289,7 @@ struct hb_buffer_t
HB_INTERNAL void guess_segment_properties ();
HB_INTERNAL bool sync ();
HB_INTERNAL void sync_so_far ();
HB_INTERNAL int sync_so_far ();
HB_INTERNAL void clear_output ();
HB_INTERNAL void clear_positions ();

Loading…
Cancel
Save