mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 04:58:04 +02:00
[truetype] Initialise font_name
Ensure the font_name is initialized to NULL.
This commit is contained in:
parent
8388af1378
commit
ab0ac1b8a8
2 changed files with 3 additions and 0 deletions
|
|
@ -1773,6 +1773,7 @@ _cairo_cff_font_create (cairo_scaled_font_subset_t *scaled_font_subset,
|
|||
font->ascent = (int16_t) be16_to_cpu (hhea.ascender);
|
||||
font->descent = (int16_t) be16_to_cpu (hhea.descender);
|
||||
|
||||
font->font_name = NULL;
|
||||
status = _cairo_truetype_read_font_name (scaled_font_subset->scaled_font,
|
||||
&font->ps_name,
|
||||
&font->font_name);
|
||||
|
|
@ -2202,6 +2203,7 @@ _cairo_cff_fallback_init (cairo_cff_subset_t *cff_subset,
|
|||
if (unlikely (status))
|
||||
goto fail2;
|
||||
|
||||
cff_subset->font_name = NULL;
|
||||
cff_subset->ps_name = strdup (font->ps_name);
|
||||
if (unlikely (cff_subset->ps_name == NULL)) {
|
||||
status = _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ _cairo_truetype_font_create (cairo_scaled_font_subset_t *scaled_font_subset,
|
|||
if (font->base.units_per_em == 0)
|
||||
font->base.units_per_em = 2048;
|
||||
|
||||
font->base.font_name = NULL;
|
||||
status = _cairo_truetype_read_font_name (scaled_font_subset->scaled_font,
|
||||
&font->base.ps_name,
|
||||
&font->base.font_name);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue