mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-02 23:38:13 +02:00
Compute right index when looking up left side bearing.
When looking up the short entries in the second part of the hmtx table, compute the size of the first part correctly. Fix from Adrian, see: https://bugs.freedesktop.org/show_bug.cgi?id=8180#c12
This commit is contained in:
parent
7c3062240a
commit
f9165638bf
1 changed files with 3 additions and 4 deletions
|
|
@ -591,10 +591,9 @@ cairo_truetype_font_write_hmtx_table (cairo_truetype_font_t *font,
|
|||
}
|
||||
font->backend->load_truetype_table (font->scaled_font_subset->scaled_font,
|
||||
TT_TAG_hmtx,
|
||||
(num_hmetrics - 1) * long_entry_size +
|
||||
(font->glyphs[i].parent_index - num_hmetrics)
|
||||
* short_entry_size,
|
||||
(unsigned char *) (p+1), &short_entry_size);
|
||||
num_hmetrics * long_entry_size +
|
||||
(font->glyphs[i].parent_index - num_hmetrics) * short_entry_size,
|
||||
(unsigned char *) (p + 1), &short_entry_size);
|
||||
}
|
||||
font->base.widths[i] = be16_to_cpu (p[0]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue