mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-21 21:30:10 +01:00
Fix _cairo_sub_font_map_glyph() to return correct unicode value
This commit is contained in:
parent
d1c619bc7d
commit
b34c248b92
1 changed files with 4 additions and 4 deletions
|
|
@ -460,10 +460,9 @@ _cairo_sub_font_map_glyph (cairo_sub_font_t *sub_font,
|
||||||
if (sub_font_glyph == NULL)
|
if (sub_font_glyph == NULL)
|
||||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||||
|
|
||||||
if (utf8_len < 0)
|
_cairo_sub_font_glyph_lookup_unicode (sub_font_glyph,
|
||||||
_cairo_sub_font_glyph_lookup_unicode (sub_font_glyph,
|
sub_font->scaled_font,
|
||||||
sub_font->scaled_font,
|
scaled_font_glyph_index);
|
||||||
scaled_font_glyph_index);
|
|
||||||
|
|
||||||
status = _cairo_hash_table_insert (sub_font->sub_font_glyphs, &sub_font_glyph->base);
|
status = _cairo_hash_table_insert (sub_font->sub_font_glyphs, &sub_font_glyph->base);
|
||||||
if (status) {
|
if (status) {
|
||||||
|
|
@ -493,6 +492,7 @@ _cairo_sub_font_map_glyph (cairo_sub_font_t *sub_font,
|
||||||
subset_glyph->x_advance = sub_font_glyph->x_advance;
|
subset_glyph->x_advance = sub_font_glyph->x_advance;
|
||||||
subset_glyph->y_advance = sub_font_glyph->y_advance;
|
subset_glyph->y_advance = sub_font_glyph->y_advance;
|
||||||
subset_glyph->utf8_is_mapped = _cairo_sub_font_glyph_map_to_unicode (sub_font_glyph, utf8, utf8_len);
|
subset_glyph->utf8_is_mapped = _cairo_sub_font_glyph_map_to_unicode (sub_font_glyph, utf8, utf8_len);
|
||||||
|
subset_glyph->unicode = sub_font_glyph->unicode;
|
||||||
|
|
||||||
return CAIRO_STATUS_SUCCESS;
|
return CAIRO_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue