freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype-demos][master] 2 commits: * src/ftdump.c (Print_


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype-demos][master] 2 commits: * src/ftdump.c (Print_Charmaps): Do not iterate UVS charmaps.
Date: Mon, 22 Nov 2021 04:21:16 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType Demo Programs

Commits:

3 changed files:

Changes:

  • src/ftcommon.c
    ... ... @@ -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
         {
    

  • src/ftdump.c
    ... ... @@ -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;
    

  • src/ftview.c
    ... ... @@ -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
       }
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]