freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype-demos][master] * src/ftbench.c (header): Look up


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype-demos][master] * src/ftbench.c (header): Look up the render mode.
Date: Tue, 07 Nov 2023 19:41:05 +0000

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

Commits:

  • 3c97458c
    by Alexei Podtelezhnikov (Алексей Подтележников) at 2023-11-07T19:41:04+00:00
    * src/ftbench.c (header): Look up the render mode.

1 changed file:

Changes:

  • src/ftbench.c
    ... ... @@ -802,13 +802,8 @@
    802 802
       static void
    
    803 803
       header( FT_Face  face )
    
    804 804
       {
    
    805
    -    const FT_String*  target =
    
    806
    -                 render_mode == FT_RENDER_MODE_NORMAL ? "normal" :
    
    807
    -                 render_mode == FT_RENDER_MODE_LIGHT  ? "light"  :
    
    808
    -                 render_mode == FT_RENDER_MODE_MONO   ? "mono"   :
    
    809
    -                 render_mode == FT_RENDER_MODE_LCD    ? "lcd"    :
    
    810
    -                 render_mode == FT_RENDER_MODE_LCD_V  ? "lcd-v"  :
    
    811
    -                 render_mode == FT_RENDER_MODE_SDF    ? "sdf"    : "";
    
    805
    +    const FT_String*  targets[FT_RENDER_MODE_MAX] =
    
    806
    +      { "normal", "light", "mono", "lcd", "lcd-v", "sdf" };
    
    812 807
         const FT_String*  module_name = FT_FACE_DRIVER_NAME( face );
    
    813 808
         const FT_String*  hinting_engine = "";
    
    814 809
         FT_UInt           prop;
    
    ... ... @@ -868,7 +863,7 @@
    868 863
                 face->family_name,
    
    869 864
                 face->style_name,
    
    870 865
                 module_name, hinting_engine,
    
    871
    -            target,
    
    866
    +            targets[render_mode],
    
    872 867
                 load_flags,
    
    873 868
                 FT_Get_Charmap_Index( face->charmap ),
    
    874 869
                 face->num_glyphs );
    


  • reply via email to

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