Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
311b78fa
by Alexei Podtelezhnikov at 2023-04-02T09:24:16-04:00
1 changed file:
Changes:
... | ... | @@ -195,7 +195,7 @@ |
195 | 195 | |
196 | 196 | FT_FRAME_EXIT();
|
197 | 197 | |
198 | - /* compute number of names stored in table */
|
|
198 | + /* compute number of names stored in the table */
|
|
199 | 199 | num_names = num_names > 257 ? num_names - 257 : 0;
|
200 | 200 | |
201 | 201 | /* now load the name strings */
|
... | ... | @@ -282,7 +282,7 @@ |
282 | 282 | goto Exit;
|
283 | 283 | }
|
284 | 284 | |
285 | - /* load the indices and note their maximum */
|
|
285 | + /* load the indices and check their Mac range */
|
|
286 | 286 | if ( FT_QNEW_ARRAY( glyph_indices, num_glyphs ) ||
|
287 | 287 | FT_FRAME_ENTER( num_glyphs ) )
|
288 | 288 | goto Fail;
|
... | ... | @@ -409,7 +409,6 @@ |
409 | 409 | FT_String** PSname )
|
410 | 410 | {
|
411 | 411 | FT_Error error;
|
412 | - TT_Post_Names names;
|
|
413 | 412 | FT_Fixed format;
|
414 | 413 | |
415 | 414 | #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
|
... | ... | @@ -429,8 +428,6 @@ |
429 | 428 | return FT_THROW( Unimplemented_Feature );
|
430 | 429 | #endif
|
431 | 430 | |
432 | - names = &face->postscript_names;
|
|
433 | - |
|
434 | 431 | /* `.notdef' by default */
|
435 | 432 | *PSname = MAC_NAME( 0 );
|
436 | 433 | |
... | ... | @@ -444,6 +441,9 @@ |
444 | 441 | else if ( format == 0x00020000L ||
|
445 | 442 | format == 0x00025000L )
|
446 | 443 | {
|
444 | + TT_Post_Names names = &face->postscript_names;
|
|
445 | + |
|
446 | + |
|
447 | 447 | if ( !names->loaded )
|
448 | 448 | {
|
449 | 449 | error = load_post_names( face );
|
... | ... | @@ -466,6 +466,7 @@ |
466 | 466 | /* nothing to do for format == 0x00030000L */
|
467 | 467 | |
468 | 468 | End:
|
469 | + /* post format errors ignored */
|
|
469 | 470 | return FT_Err_Ok;
|
470 | 471 | }
|
471 | 472 |