mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-23 07:51:10 +01:00
Fix kerx attachment shaping issues (#5515)
* [ot-shape] Don't zero offsets of default-ignorables Part of fixing https://github.com/harfbuzz/harfbuzz/issues/5514 * [ot-shape] Propagate chain offsets in opposite direction if RTL Part of fixing https://github.com/harfbuzz/harfbuzz/issues/5514
This commit is contained in:
1 parent
7d936359a2
commit
bc6eba9407
2 files changed
+16
-3
No files matched your search
@@ -149,8 +149,15 @@ GPOS::position_finish_offsets (hb_font_t *font, hb_buffer_t *buffer)
|
||||
|
||||
/* Handle attachments */
|
||||
if (buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_GPOS_ATTACHMENT)
|
||||
for (unsigned i = 0; i < len; i++)
|
||||
propagate_attachment_offsets (pos, len, i, direction);
|
||||
{
|
||||
// https://github.com/harfbuzz/harfbuzz/issues/5514
|
||||
if (HB_DIRECTION_IS_FORWARD (direction))
|
||||
for (unsigned i = 0; i < len; i++)
|
||||
propagate_attachment_offsets (pos, len, i, direction);
|
||||
else
|
||||
for (unsigned i = len; i-- > 0; )
|
||||
propagate_attachment_offsets (pos, len, i, direction);
|
||||
}
|
||||
|
||||
if (unlikely (font->slant_xy) &&
|
||||
HB_DIRECTION_IS_HORIZONTAL (direction))
|
||||
|
||||
+7
-1
@@ -788,7 +788,13 @@ hb_ot_zero_width_default_ignorables (const hb_buffer_t *buffer)
|
||||
unsigned int i = 0;
|
||||
for (i = 0; i < count; i++)
|
||||
if (unlikely (_hb_glyph_info_is_default_ignorable (&info[i])))
|
||||
pos[i].x_advance = pos[i].y_advance = pos[i].x_offset = pos[i].y_offset = 0;
|
||||
{
|
||||
pos[i].x_advance = pos[i].y_advance = 0;
|
||||
if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction))
|
||||
pos[i].x_offset = 0;
|
||||
else
|
||||
pos[i].y_offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in new issue
Block a user