[unsafe-to-concat] Mark entire buffer unsafe-to-concat if kerx format2
This commit is contained in:
parent
60006d3687
commit
c0058892be
|
@ -406,6 +406,7 @@ struct KerxSubTableFormat2
|
||||||
accelerator_t accel (*this, c);
|
accelerator_t accel (*this, c);
|
||||||
hb_kern_machine_t<accelerator_t> machine (accel, header.coverage & header.CrossStream);
|
hb_kern_machine_t<accelerator_t> machine (accel, header.coverage & header.CrossStream);
|
||||||
machine.kern (c->font, c->buffer, c->plan->kern_mask);
|
machine.kern (c->font, c->buffer, c->plan->kern_mask);
|
||||||
|
c->buffer->set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_CONCAT);
|
||||||
|
|
||||||
return_trace (true);
|
return_trace (true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -386,12 +386,15 @@ struct hb_buffer_t
|
||||||
HB_INTERNAL void delete_glyph ();
|
HB_INTERNAL void delete_glyph ();
|
||||||
|
|
||||||
|
|
||||||
void set_glyph_flags (unsigned start,
|
void set_glyph_flags (hb_mask_t mask,
|
||||||
unsigned end,
|
unsigned start = 0,
|
||||||
hb_mask_t mask,
|
unsigned end = (unsigned) -1,
|
||||||
bool interior = false,
|
bool interior = false,
|
||||||
bool from_out_buffer = false)
|
bool from_out_buffer = false)
|
||||||
{
|
{
|
||||||
|
if (end == (unsigned) -1)
|
||||||
|
end = len;
|
||||||
|
|
||||||
if (interior && !from_out_buffer && end - start < 2)
|
if (interior && !from_out_buffer && end - start < 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -435,22 +438,26 @@ struct hb_buffer_t
|
||||||
|
|
||||||
void unsafe_to_break (unsigned int start, unsigned int end)
|
void unsafe_to_break (unsigned int start, unsigned int end)
|
||||||
{
|
{
|
||||||
set_glyph_flags (start, end, HB_GLYPH_FLAG_UNSAFE_TO_BREAK | HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
|
set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_BREAK | HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
|
||||||
|
start, end,
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
void unsafe_to_concat (unsigned int start, unsigned int end)
|
void unsafe_to_concat (unsigned int start, unsigned int end)
|
||||||
{
|
{
|
||||||
set_glyph_flags (start, end, HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
|
set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
|
||||||
|
start, end,
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
void unsafe_to_break_from_outbuffer (unsigned int start, unsigned int end)
|
void unsafe_to_break_from_outbuffer (unsigned int start, unsigned int end)
|
||||||
{
|
{
|
||||||
set_glyph_flags (start, end, HB_GLYPH_FLAG_UNSAFE_TO_BREAK | HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
|
set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_BREAK | HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
|
||||||
|
start, end,
|
||||||
true, true);
|
true, true);
|
||||||
}
|
}
|
||||||
void unsafe_to_concat_from_outbuffer (unsigned int start, unsigned int end)
|
void unsafe_to_concat_from_outbuffer (unsigned int start, unsigned int end)
|
||||||
{
|
{
|
||||||
set_glyph_flags (start, end, HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
|
set_glyph_flags (HB_GLYPH_FLAG_UNSAFE_TO_CONCAT,
|
||||||
|
start, end,
|
||||||
true, true);
|
true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue