Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType Demo Programs
Commits:
-
39027798
by Alexei Podtelezhnikov at 2021-11-21T23:05:03-05:00
-
937507d7
by Alexei Podtelezhnikov at 2021-11-21T23:19:25-05:00
3 changed files:
Changes:
... | ... | @@ -681,8 +681,8 @@ |
681 | 681 |
FT_UInt gidx;
|
682 | 682 |
|
683 | 683 |
|
684 |
- /* activate charmap */
|
|
685 |
- face->charmap = face->charmaps[idx];
|
|
684 |
+ if ( FT_Set_Charmap ( face, face->charmaps[idx] ) )
|
|
685 |
+ return -1;
|
|
686 | 686 |
|
687 | 687 |
do
|
688 | 688 |
{
|
... | ... | @@ -542,6 +542,9 @@ |
542 | 542 |
|
543 | 543 |
printf ( "\n" );
|
544 | 544 |
|
545 |
+ if ( lang_id == 0xFFFFFFFFUL ) /* nothing further for UVS */
|
|
546 |
+ continue;
|
|
547 |
+ |
|
545 | 548 |
if ( coverage == 2 )
|
546 | 549 |
{
|
547 | 550 |
FT_ULong charcode;
|
... | ... | @@ -956,7 +956,7 @@ |
956 | 956 |
|
957 | 957 |
if ( status.offset < 0 )
|
958 | 958 |
status.offset = 0;
|
959 |
- else if ( status.offset >= num_indices )
|
|
959 |
+ if ( status.offset >= num_indices )
|
|
960 | 960 |
status.offset = num_indices - 1;
|
961 | 961 |
|
962 | 962 |
return old_offset == status.offset ? 0 : 1;
|
... | ... | @@ -986,7 +986,12 @@ |
986 | 986 |
|
987 | 987 |
FTDemo_Set_Current_Font( handle, font );
|
988 | 988 |
|
989 |
- status.offset = handle->encoding == FT_ENCODING_ORDER ? 0 : 0x20;
|
|
989 |
+ if ( handle->encoding == FT_ENCODING_ORDER )
|
|
990 |
+ status.offset = 0;
|
|
991 |
+ else if ( font->num_indices <= 0x20 ) /* including UVS */
|
|
992 |
+ status.offset = font->num_indices - 1;
|
|
993 |
+ else
|
|
994 |
+ status.offset = 0x20;
|
|
990 | 995 |
|
991 | 996 |
return 1;
|
992 | 997 |
}
|