Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
71969d1e
by Alexei Podtelezhnikov at 2021-09-20T14:31:45-04:00
1 changed file:
Changes:
... | ... | @@ -473,12 +473,12 @@ |
473 | 473 |
|
474 | 474 |
if ( cff && !cff->font_info )
|
475 | 475 |
{
|
476 |
- CFF_FontRecDict dict = &cff->top_font.font_dict;
|
|
477 |
- PS_FontInfoRec *font_info = NULL;
|
|
478 |
- FT_Memory memory = face->root.memory;
|
|
476 |
+ CFF_FontRecDict dict = &cff->top_font.font_dict;
|
|
477 |
+ FT_Memory memory = face->root.memory;
|
|
478 |
+ PS_FontInfoRec* font_info;
|
|
479 | 479 |
|
480 | 480 |
|
481 |
- if ( FT_QALLOC( font_info, sizeof ( *font_info ) ) )
|
|
481 |
+ if ( FT_QNEW( font_info ) )
|
|
482 | 482 |
goto Fail;
|
483 | 483 |
|
484 | 484 |
font_info->version = cff_index_get_sid_string( cff,
|
... | ... | @@ -515,15 +515,15 @@ |
515 | 515 |
FT_Error error = FT_Err_Ok;
|
516 | 516 |
|
517 | 517 |
|
518 |
- if ( cff && cff->font_extra == NULL )
|
|
518 |
+ if ( cff && !cff->font_extra )
|
|
519 | 519 |
{
|
520 |
- CFF_FontRecDict dict = &cff->top_font.font_dict;
|
|
521 |
- PS_FontExtraRec* font_extra = NULL;
|
|
522 |
- FT_Memory memory = face->root.memory;
|
|
520 |
+ CFF_FontRecDict dict = &cff->top_font.font_dict;
|
|
521 |
+ FT_Memory memory = face->root.memory;
|
|
522 |
+ PS_FontExtraRec* font_extra;
|
|
523 | 523 |
FT_String* embedded_postscript;
|
524 | 524 |
|
525 | 525 |
|
526 |
- if ( FT_ALLOC( font_extra, sizeof ( *font_extra ) ) )
|
|
526 |
+ if ( FT_QNEW( font_extra ) )
|
|
527 | 527 |
goto Fail;
|
528 | 528 |
|
529 | 529 |
font_extra->fs_type = 0U;
|