freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] 2 commits: * src/type1/t1afm.c (T1_Read


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] 2 commits: * src/type1/t1afm.c (T1_Read_PFM): Set charmaps directly.
Date: Mon, 03 Oct 2022 23:29:56 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

  • 1b6dce84
    by Alexei Podtelezhnikov at 2022-10-03T19:18:48-04:00
    * src/type1/t1afm.c (T1_Read_PFM): Set charmaps directly.
    
    As with the previous commit, we can avoid the validation checks
    of `FT_Set_Charmap` and set it directly when choosing from the
    available list.
    
  • 0417527d
    by Alexei Podtelezhnikov at 2022-10-03T19:23:26-04:00
    [autofit] Reset the face charmap directly.
    
    There is no need to validate the original charmap in `FT_Set_Charmap`.
    It can be reset directly.
    
    * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
    Use direct assignment.
    * src/autofit/af{latin,cjk,indic}.c (af_latin_metrics_init): Ditto.
    

5 changed files:

Changes:

  • src/autofit/afcjk.c
    ... ... @@ -650,7 +650,7 @@
    650 650
           af_cjk_metrics_check_digits( metrics, face );
    
    651 651
         }
    
    652 652
     
    
    653
    -    FT_Set_Charmap( face, oldmap );
    
    653
    +    face->charmap = oldmap;
    
    654 654
         return FT_Err_Ok;
    
    655 655
       }
    
    656 656
     
    

  • src/autofit/afglobal.c
    ... ... @@ -317,7 +317,7 @@
    317 317
     
    
    318 318
     #endif /* FT_DEBUG_LEVEL_TRACE */
    
    319 319
     
    
    320
    -    FT_Set_Charmap( face, old_charmap );
    
    320
    +    face->charmap = old_charmap;
    
    321 321
         return error;
    
    322 322
       }
    
    323 323
     
    

  • src/autofit/afindic.c
    ... ... @@ -49,8 +49,7 @@
    49 49
           af_cjk_metrics_check_digits( metrics, face );
    
    50 50
         }
    
    51 51
     
    
    52
    -    FT_Set_Charmap( face, oldmap );
    
    53
    -
    
    52
    +    face->charmap = oldmap;
    
    54 53
         return FT_Err_Ok;
    
    55 54
       }
    
    56 55
     
    

  • src/autofit/aflatin.c
    ... ... @@ -1157,7 +1157,7 @@
    1157 1157
         }
    
    1158 1158
     
    
    1159 1159
       Exit:
    
    1160
    -    FT_Set_Charmap( face, oldmap );
    
    1160
    +    face->charmap = oldmap;
    
    1161 1161
         return error;
    
    1162 1162
       }
    
    1163 1163
     
    

  • src/type1/t1afm.c
    ... ... @@ -178,7 +178,6 @@
    178 178
         /* temporarily.  If we find no PostScript charmap, then just use    */
    
    179 179
         /* the default and hope it is the right one.                        */
    
    180 180
         oldcharmap = t1_face->charmap;
    
    181
    -    charmap    = NULL;
    
    182 181
     
    
    183 182
         for ( n = 0; n < t1_face->num_charmaps; n++ )
    
    184 183
         {
    
    ... ... @@ -186,9 +185,7 @@
    186 185
           /* check against PostScript pseudo platform */
    
    187 186
           if ( charmap->platform_id == 7 )
    
    188 187
           {
    
    189
    -        error = FT_Set_Charmap( t1_face, charmap );
    
    190
    -        if ( error )
    
    191
    -          goto Exit;
    
    188
    +        t1_face->charmap = charmap;
    
    192 189
             break;
    
    193 190
           }
    
    194 191
         }
    
    ... ... @@ -209,10 +206,7 @@
    209 206
           kp++;
    
    210 207
         }
    
    211 208
     
    
    212
    -    if ( oldcharmap )
    
    213
    -      error = FT_Set_Charmap( t1_face, oldcharmap );
    
    214
    -    if ( error )
    
    215
    -      goto Exit;
    
    209
    +    t1_face->charmap = oldcharmap;
    
    216 210
     
    
    217 211
         /* now, sort the kern pairs according to their glyph indices */
    
    218 212
         ft_qsort( fi->KernPairs, fi->NumKernPair, sizeof ( AFM_KernPairRec ),
    


  • reply via email to

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