mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 23:28:07 +02:00
Merge branch 'issue-870' into 'master'
cff: Don't fail if no local subs Closes #870 See merge request cairo/cairo!595
This commit is contained in:
commit
b9eed915f9
1 changed files with 7 additions and 3 deletions
|
|
@ -952,9 +952,13 @@ cairo_cff_font_read_private_dict (cairo_cff_font_t *font,
|
|||
decode_number (operand, nominal_width);
|
||||
|
||||
num_subs = _cairo_array_num_elements (local_sub_index);
|
||||
*local_subs_used = _cairo_calloc_ab (num_subs, sizeof (cairo_bool_t));
|
||||
if (unlikely (*local_subs_used == NULL))
|
||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
if (num_subs > 0) {
|
||||
*local_subs_used = _cairo_calloc_ab (num_subs, sizeof (cairo_bool_t));
|
||||
if (unlikely (*local_subs_used == NULL))
|
||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
} else {
|
||||
*local_subs_used = NULL;
|
||||
}
|
||||
|
||||
if (num_subs < 1240)
|
||||
*local_sub_bias = 107;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue