Ben Wagner pushed to branch master at FreeType / FreeType
Commits:
-
59320b2d
by Ben Wagner at 2024-12-04T16:55:10-05:00
1 changed file:
Changes:
... | ... | @@ -537,8 +537,8 @@ |
537 | 537 | |
538 | 538 | sfnt_format = 1;
|
539 | 539 | |
540 | - /* now, the font can be either an OpenType/CFF font, or an SVG CEF */
|
|
541 | - /* font; in the latter case it doesn't have a `head' table */
|
|
540 | + /* the font may be OpenType/CFF, SVG CEF, or sfnt/CFF; a `head' table */
|
|
541 | + /* implies OpenType/CFF, otherwise just look for an optional cmap */
|
|
542 | 542 | error = face->goto_table( face, TTAG_head, stream, 0 );
|
543 | 543 | if ( !error )
|
544 | 544 | {
|
... | ... | @@ -550,13 +550,15 @@ |
550 | 550 | if ( error )
|
551 | 551 | goto Exit;
|
552 | 552 | }
|
553 | + else
|
|
554 | + {
|
|
555 | + /* load the `cmap' table explicitly */
|
|
556 | + error = sfnt->load_cmap( face, stream );
|
|
553 | 557 | |
554 | - /* load the `cmap' table explicitly */
|
|
555 | - error = sfnt->load_cmap( face, stream );
|
|
556 | - |
|
557 | - /* this may fail because CID-keyed fonts don't have a cmap */
|
|
558 | - if ( FT_ERR_NEQ( error, Table_Missing ) && FT_ERR_NEQ( error, Ok ) )
|
|
559 | - goto Exit;
|
|
558 | + /* this may fail because CID-keyed fonts don't have a cmap */
|
|
559 | + if ( FT_ERR_NEQ( error, Table_Missing ) && FT_ERR_NEQ( error, Ok ) )
|
|
560 | + goto Exit;
|
|
561 | + }
|
|
560 | 562 | |
561 | 563 | /* now load the CFF part of the file; */
|
562 | 564 | /* give priority to CFF2 */
|