freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [truetype] Reduce Infinality footprint


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] [truetype] Reduce Infinality footprint again.
Date: Tue, 07 Dec 2021 15:26:00 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

1 changed file:

Changes:

  • src/truetype/ttgload.c
    ... ... @@ -2262,14 +2262,20 @@
    2262 2262
         /* unless FT_LOAD_COMPUTE_METRICS is set or backward compatibility */
    
    2263 2263
         /* mode of the v40 interpreter is active.  See `ttinterp.h' for    */
    
    2264 2264
         /* details on backward compatibility mode.                         */
    
    2265
    -    if (
    
    2265
    +    if ( IS_HINTED( loader->load_flags )                                &&
    
    2266
    +         !( loader->load_flags & FT_LOAD_COMPUTE_METRICS )              &&
    
    2266 2267
     #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
    
    2267 2268
              !( driver->interpreter_version == TT_INTERPRETER_VERSION_40  &&
    
    2268 2269
                 ( loader->exec && loader->exec->backward_compatibility  ) ) &&
    
    2269 2270
     #endif
    
    2270
    -         !face->postscript.isFixedPitch                                 &&
    
    2271
    -         IS_HINTED( loader->load_flags )                                &&
    
    2272
    -         !( loader->load_flags & FT_LOAD_COMPUTE_METRICS )              )
    
    2271
    +#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
    
    2272
    +         !( driver->interpreter_version == TT_INTERPRETER_VERSION_38  &&
    
    2273
    +            !SPH_OPTION_BITMAP_WIDTHS                                 &&
    
    2274
    +            FT_LOAD_TARGET_MODE( loader->load_flags ) !=
    
    2275
    +                                                 FT_RENDER_MODE_MONO  &&
    
    2276
    +            ( loader->exec && !loader->exec->compatible_widths )      ) &&
    
    2277
    +#endif
    
    2278
    +         !face->postscript.isFixedPitch                                 )
    
    2273 2279
         {
    
    2274 2280
           FT_Byte*  widthp;
    
    2275 2281
     
    
    ... ... @@ -2278,30 +2284,8 @@
    2278 2284
                                                size->metrics->x_ppem,
    
    2279 2285
                                                glyph_index );
    
    2280 2286
     
    
    2281
    -#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
    
    2282
    -
    
    2283
    -      if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )
    
    2284
    -      {
    
    2285
    -        FT_Bool  ignore_x_mode;
    
    2286
    -
    
    2287
    -
    
    2288
    -        ignore_x_mode = FT_BOOL( FT_LOAD_TARGET_MODE( loader->load_flags ) !=
    
    2289
    -                                 FT_RENDER_MODE_MONO );
    
    2290
    -
    
    2291
    -        if ( widthp                                                   &&
    
    2292
    -             ( ( ignore_x_mode && loader->exec->compatible_widths ) ||
    
    2293
    -                !ignore_x_mode                                      ||
    
    2294
    -                SPH_OPTION_BITMAP_WIDTHS                            ) )
    
    2295
    -          glyph->metrics.horiAdvance = *widthp * 64;
    
    2296
    -      }
    
    2297
    -      else
    
    2298
    -
    
    2299
    -#endif /* TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY */
    
    2300
    -
    
    2301
    -      {
    
    2302
    -        if ( widthp )
    
    2303
    -          glyph->metrics.horiAdvance = *widthp * 64;
    
    2304
    -      }
    
    2287
    +      if ( widthp )
    
    2288
    +        glyph->metrics.horiAdvance = *widthp * 64;
    
    2305 2289
         }
    
    2306 2290
     
    
    2307 2291
         /* set glyph dimensions */
    


  • reply via email to

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