freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype-demos][master] Remove code related to warping.


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype-demos][master] Remove code related to warping.
Date: Sat, 17 Jul 2021 06:06:51 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType Demo Programs

Commits:

9 changed files:

Changes:

  • ChangeLog
    1
    +2021-07-17  Werner Lemberg  <wl@gnu.org>
    
    2
    +
    
    3
    +	Remove code related to warping.
    
    4
    +
    
    5
    +	This synchronizes the demo programs with commit 2f11522a from the
    
    6
    +	FreeType repository.
    
    7
    +
    
    8
    +	* src/ftcommon.c (FTDemo_Hinting_Engine_Change, FTDemo_Get_Info):
    
    9
    +	Updated.
    
    10
    +
    
    11
    +	* src/ftdiff.c (ColumnStateRec, render_state_init,
    
    12
    +	render_state_draw, event_help, process_event): Updated.
    
    13
    +
    
    14
    +	* src/ftgrid.c (event_help): Updated.
    
    15
    +
    
    16
    +	* src/ftinspect/engine/engine.cpp (Engine::Engine, Engine::update),
    
    17
    +	src/ftinspect/engine/engine.hpp (Engine): Updated.
    
    18
    +	* src/ftinspect/maingui.cpp (MainGUI::checkHinting,
    
    19
    +	MainGUI::checkAutoHinting, MainGUI::createLayout),
    
    20
    +	src/ftinspect/maingui.hpp (MainGUI): Updated.
    
    21
    +
    
    1 22
     2021-07-01  Werner Lemberg  <wl@gnu.org>
    
    2 23
     
    
    3 24
     	* src/ftlint.c (main): Minor output improvement.
    

  • src/ftcommon.c
    ... ... @@ -907,7 +907,7 @@
    907 907
       }
    
    908 908
     
    
    909 909
     
    
    910
    -  /* switch to a different engine if possible, including warping */
    
    910
    +  /* switch to a different engine if possible */
    
    911 911
       int
    
    912 912
       FTDemo_Hinting_Engine_Change( FTDemo_Handle*  handle )
    
    913 913
       {
    
    ... ... @@ -929,18 +929,9 @@
    929 929
     
    
    930 930
         module_name = (*(FT_Module_Class**)(face->driver))->module_name;
    
    931 931
     
    
    932
    -    if ( handle->autohint )
    
    933
    -    {
    
    934
    -      FT_Bool  warp;
    
    935
    -
    
    936
    -
    
    937
    -      FT_Property_Get( library, "autofitter", "warping", &warp );
    
    938
    -      warp = !warp;
    
    939
    -      FT_Property_Set( library, "autofitter", "warping", &warp );
    
    940
    -    }
    
    941
    -
    
    942
    -    else if ( !FT_Property_Get( library, module_name,
    
    943
    -                                         "interpreter-version", &prop ) )
    
    932
    +    if ( !handle->autohint                                         &&
    
    933
    +         !FT_Property_Get( library, module_name,
    
    934
    +                                    "interpreter-version", &prop ) )
    
    944 935
         {
    
    945 936
           switch ( prop )
    
    946 937
           {
    
    ... ... @@ -1024,10 +1015,7 @@
    1024 1015
           hinting_engine = " auto";
    
    1025 1016
     
    
    1026 1017
         else if ( handle->autohint )
    
    1027
    -    {
    
    1028
    -      FT_Property_Get( library, "autofitter", "warping", &prop );
    
    1029
    -      hinting_engine = prop ? " warp" : " auto";
    
    1030
    -    }
    
    1018
    +      hinting_engine = " auto";
    
    1031 1019
     
    
    1032 1020
         else if ( !FT_Property_Get( library, module_name,
    
    1033 1021
                                              "interpreter-version", &prop ) )
    

  • src/ftcommon.h
    ... ... @@ -293,7 +293,7 @@
    293 293
                        FT_Size*        asize );
    
    294 294
     
    
    295 295
     
    
    296
    -  /* switch to a different engine if possible, including warping */
    
    296
    +  /* switch to a different engine if possible */
    
    297 297
       int
    
    298 298
       FTDemo_Hinting_Engine_Change( FTDemo_Handle*  handle );
    
    299 299
     
    

  • src/ftdiff.c
    ... ... @@ -188,7 +188,6 @@
    188 188
         unsigned int   tt_interpreter_versions[3];
    
    189 189
         int            num_tt_interpreter_versions;
    
    190 190
         int            tt_interpreter_version_idx;
    
    191
    -    FT_Bool        warping;
    
    192 191
     
    
    193 192
       } ColumnStateRec, *ColumnState;
    
    194 193
     
    
    ... ... @@ -233,7 +232,6 @@
    233 232
         FT_UInt  cff_hinting_engine;
    
    234 233
         FT_UInt  type1_hinting_engine;
    
    235 234
         FT_UInt  t1cid_hinting_engine;
    
    236
    -    FT_Bool  warping;
    
    237 235
     
    
    238 236
         unsigned int  tt_interpreter_versions[3]  = { 0, 0, 0 };
    
    239 237
         int           num_tt_interpreter_versions = 0;
    
    ... ... @@ -287,10 +285,6 @@
    287 285
                          "truetype",
    
    288 286
                          "interpreter-version", &dflt_tt_interpreter_version );
    
    289 287
     
    
    290
    -    FT_Property_Get( library,
    
    291
    -                     "autofitter",
    
    292
    -                     "warping", &warping );
    
    293
    -
    
    294 288
         state->columns[0].use_cboxes             = 0;
    
    295 289
         state->columns[0].use_kerning            = 1;
    
    296 290
         state->columns[0].use_deltas             = 1;
    
    ... ... @@ -312,7 +306,6 @@
    312 306
         state->columns[0].tt_interpreter_version_idx =
    
    313 307
           tt_interpreter_version_idx;
    
    314 308
     
    
    315
    -    state->columns[0].warping                = warping;
    
    316 309
         state->columns[0].use_custom_lcd_filter  = 0;
    
    317 310
         state->columns[0].fw_index               = 2;
    
    318 311
         /* FreeType default filter weights */
    
    ... ... @@ -572,7 +565,6 @@
    572 565
         FT_Pos       prev_rsb_delta = 0;
    
    573 566
         FT_Pos       x_origin       = x << 6;
    
    574 567
         HintMode     rmode          = column->hint_mode;
    
    575
    -    FT_Bool      warping        = column->warping;
    
    576 568
         FT_Bool      have_0x0A      = 0;
    
    577 569
         FT_Bool      have_0x0D      = 0;
    
    578 570
     
    
    ... ... @@ -596,10 +588,6 @@
    596 588
                          "interpreter-version",
    
    597 589
                          &column->tt_interpreter_versions
    
    598 590
                            [column->tt_interpreter_version_idx] );
    
    599
    -    FT_Property_Set( state->library,
    
    600
    -                     "autofitter",
    
    601
    -                     "warping",
    
    602
    -                     &column->warping );
    
    603 591
     
    
    604 592
         /* changing a property is in most cases a global operation; */
    
    605 593
         /* we are on the safe side if we reload the face completely */
    
    ... ... @@ -870,8 +858,6 @@
    870 858
               }
    
    871 859
             }
    
    872 860
           }
    
    873
    -      else if ( rmode == HINT_MODE_AUTOHINT )
    
    874
    -        extra = warping ? " (+warp)" : " (-warp)";
    
    875 861
     
    
    876 862
           snprintf( temp, sizeof ( temp ), "%s%s",
    
    877 863
                     render_mode_names[column->hint_mode], extra );
    
    ... ... @@ -1145,11 +1131,9 @@
    1145 1131
         grWriteln( "  h           cycle hinting mode          A          unhinted               " );
    
    1146 1132
         grWriteln( "  H           cycle hinting engine        B          auto-hinter            " );
    
    1147 1133
         grWriteln( "               (if CFF or TTF)            C          light auto-hinter      " );
    
    1148
    -    grWriteln( "  w           toggle warping (if          D          light auto-hinter      " );
    
    1149
    -    grWriteln( "               normal auto-hinting)                   (subpixel)            " );
    
    1150
    -    grWriteln( "  k           toggle kerning (only        E          native hinter          " );
    
    1151
    -    grWriteln( "               from `kern' table)                                           " );
    
    1152
    -    grWriteln( "  r           toggle rendering mode                                         " );
    
    1134
    +    grWriteln( "  k           toggle kerning (only        D          light auto-hinter      " );
    
    1135
    +    grWriteln( "               from `kern' table)                     (subpixel)            " );
    
    1136
    +    grWriteln( "  r           toggle rendering mode       E          native hinter          " );
    
    1153 1137
         grWriteln( "  x           toggle layout mode                                            " );
    
    1154 1138
         grWriteln( "                                                                            " );
    
    1155 1139
         grWriteln( "  l           cycle LCD filtering                                           " );
    
    ... ... @@ -1331,20 +1315,6 @@
    1331 1315
           }
    
    1332 1316
           break;
    
    1333 1317
     
    
    1334
    -    case grKEY( 'w' ):
    
    1335
    -      {
    
    1336
    -        FT_Bool  new_warping_state = !column->warping;
    
    1337
    -
    
    1338
    -
    
    1339
    -        error = FT_Property_Set( state->library,
    
    1340
    -                                 "autofitter",
    
    1341
    -                                 "warping",
    
    1342
    -                                 &new_warping_state );
    
    1343
    -        if ( !error )
    
    1344
    -          column->warping = new_warping_state;
    
    1345
    -      }
    
    1346
    -      break;
    
    1347
    -
    
    1348 1318
         case grKEY( 'k' ):
    
    1349 1319
           column->use_kerning = !column->use_kerning;
    
    1350 1320
           break;
    

  • src/ftgrid.c
    ... ... @@ -850,22 +850,22 @@
    850 850
         grWriteln( "Up, Down    adjust size by 0.5pt        if not auto-hinting:                " );
    
    851 851
         grWriteln( "                                          H         cycle through hinting   " );
    
    852 852
         grWriteln( "Left, Right adjust index by 1                        engines (if available) " );
    
    853
    -    grWriteln( "F7, F8      adjust index by 16          if normal auto-hinting:             " );
    
    854
    -    grWriteln( "F9, F10     adjust index by 256           w         toggle warping          " );
    
    855
    -    grWriteln( "F11, F12    adjust index by 4096                      (if available)        " );
    
    856
    -    grWriteln( "                                                                            " );
    
    857
    -    grWriteln( "h           toggle hinting              b           toggle bitmap           " );
    
    858
    -    grWriteln( "f           toggle forced auto-         d           toggle dot display      " );
    
    859
    -    grWriteln( "             hinting (if hinting)       o           toggle outline display  " );
    
    860
    -    grWriteln( "G           toggle grid display         D           toggle dotnumber display" );
    
    861
    -    grWriteln( "C           change color palette                                            " );
    
    862
    -    grWriteln( "                                        if Multiple Master or GX font:      " );
    
    863
    -    grWriteln( "F5, F6      cycle through                 F2        cycle through axes      " );
    
    864
    -    grWriteln( "             anti-aliasing modes          F3, F4    adjust current axis by  " );
    
    865
    -    grWriteln( "L           cycle through LCD                        1/50th of its range    " );
    
    866
    -    grWriteln( "             filters                                                        " );
    
    867
    -    grWriteln( "                                        P           print PNG file          " );
    
    868
    -    grWriteln( "g, v        adjust gamma value          q, ESC      quit ftgrid             " );
    
    853
    +    grWriteln( "F7, F8      adjust index by 16                                              " );
    
    854
    +    grWriteln( "F9, F10     adjust index by 256         b           toggle bitmap           " );
    
    855
    +    grWriteln( "F11, F12    adjust index by 4096        d           toggle dot display      " );
    
    856
    +    grWriteln( "                                        o           toggle outline display  " );
    
    857
    +    grWriteln( "h           toggle hinting              D           toggle dotnumber display" );
    
    858
    +    grWriteln( "f           toggle forced auto-                                             " );
    
    859
    +    grWriteln( "             hinting (if hinting)       if Multiple Master or GX font:      " );
    
    860
    +    grWriteln( "G           toggle grid display           F2        cycle through axes      " );
    
    861
    +    grWriteln( "C           change color palette          F3, F4    adjust current axis by  " );
    
    862
    +    grWriteln( "                                                     1/50th of its range    " );
    
    863
    +    grWriteln( "F5, F6      cycle through                                                   " );
    
    864
    +    grWriteln( "             anti-aliasing modes        P           print PNG file          " );
    
    865
    +    grWriteln( "L           cycle through LCD           q, ESC      quit ftgrid             " );
    
    866
    +    grWriteln( "             filters" );
    
    867
    +    grLn();
    
    868
    +    grWriteln( "g, v        adjust gamma value" );
    
    869 869
         /*          |----------------------------------|    |----------------------------------| */
    
    870 870
         grLn();
    
    871 871
         grLn();
    

  • src/ftinspect/engine/engine.cpp
    ... ... @@ -244,28 +244,6 @@ Engine::Engine(MainGUI* g)
    244 244
                         "interpreter-version",
    
    245 245
                         &ttInterpreterVersionDefault);
    
    246 246
       }
    
    247
    -
    
    248
    -  // auto-hinter
    
    249
    -  error = FT_Property_Get(library,
    
    250
    -                          "autofitter",
    
    251
    -                          "warping",
    
    252
    -                          &doWarping);
    
    253
    -  if (error)
    
    254
    -  {
    
    255
    -    // no warping
    
    256
    -    haveWarping = 0;
    
    257
    -    doWarping = 0;
    
    258
    -  }
    
    259
    -  else
    
    260
    -  {
    
    261
    -    haveWarping = 1;
    
    262
    -    doWarping = 0; // we don't do warping by default
    
    263
    -
    
    264
    -    FT_Property_Set(library,
    
    265
    -                    "autofitter",
    
    266
    -                    "warping",
    
    267
    -                    &doWarping);
    
    268
    -  }
    
    269 247
     }
    
    270 248
     
    
    271 249
     
    
    ... ... @@ -573,7 +551,6 @@ Engine::update()
    573 551
       doVerticalHinting = gui->verticalHintingCheckBox->isChecked();
    
    574 552
       doBlueZoneHinting = gui->blueZoneHintingCheckBox->isChecked();
    
    575 553
       showSegments = gui->segmentDrawingCheckBox->isChecked();
    
    576
    -  doWarping = gui->warpingCheckBox->isChecked();
    
    577 554
     
    
    578 555
       gamma = gui->gammaSlider->value();
    
    579 556
     
    

  • src/ftinspect/engine/engine.hpp
    ... ... @@ -99,8 +99,6 @@ private:
    99 99
     
    
    100 100
       int fontType;
    
    101 101
     
    
    102
    -  int haveWarping;
    
    103
    -
    
    104 102
       double pointSize;
    
    105 103
       double pixelSize;
    
    106 104
       unsigned int dpi;
    
    ... ... @@ -111,7 +109,6 @@ private:
    111 109
       bool doVerticalHinting;
    
    112 110
       bool doBlueZoneHinting;
    
    113 111
       bool showSegments;
    
    114
    -  bool doWarping;
    
    115 112
     
    
    116 113
       double gamma;
    
    117 114
     
    

  • src/ftinspect/maingui.cpp
    ... ... @@ -270,7 +270,6 @@ MainGUI::checkHinting()
    270 270
         verticalHintingCheckBox->setEnabled(false);
    
    271 271
         blueZoneHintingCheckBox->setEnabled(false);
    
    272 272
         segmentDrawingCheckBox->setEnabled(false);
    
    273
    -    warpingCheckBox->setEnabled(false);
    
    274 273
     
    
    275 274
         antiAliasingComboBoxx->setItemEnabled(AntiAliasing_Light, false);
    
    276 275
       }
    
    ... ... @@ -312,8 +311,6 @@ MainGUI::checkAutoHinting()
    312 311
         verticalHintingCheckBox->setEnabled(true);
    
    313 312
         blueZoneHintingCheckBox->setEnabled(true);
    
    314 313
         segmentDrawingCheckBox->setEnabled(true);
    
    315
    -    if (engine->haveWarping)
    
    316
    -      warpingCheckBox->setEnabled(true);
    
    317 314
     
    
    318 315
         antiAliasingComboBoxx->setItemEnabled(AntiAliasing_Light, true);
    
    319 316
       }
    
    ... ... @@ -330,7 +327,6 @@ MainGUI::checkAutoHinting()
    330 327
         verticalHintingCheckBox->setEnabled(false);
    
    331 328
         blueZoneHintingCheckBox->setEnabled(false);
    
    332 329
         segmentDrawingCheckBox->setEnabled(false);
    
    333
    -    warpingCheckBox->setEnabled(false);
    
    334 330
     
    
    335 331
         antiAliasingComboBoxx->setItemEnabled(AntiAliasing_Light, false);
    
    336 332
     
    
    ... ... @@ -740,7 +736,6 @@ MainGUI::createLayout()
    740 736
       verticalHintingCheckBox = new QCheckBox(tr("Vertical Hinting"));
    
    741 737
       blueZoneHintingCheckBox = new QCheckBox(tr("Blue-Zone Hinting"));
    
    742 738
       segmentDrawingCheckBox = new QCheckBox(tr("Segment Drawing"));
    
    743
    -  warpingCheckBox = new QCheckBox(tr("Warping"));
    
    744 739
     
    
    745 740
       antiAliasingLabel = new QLabel(tr("Anti-Aliasing"));
    
    746 741
       antiAliasingLabel->setAlignment(Qt::AlignRight);
    
    ... ... @@ -824,10 +819,6 @@ MainGUI::createLayout()
    824 819
       segmentDrawingLayout->addSpacing(20); // XXX px
    
    825 820
       segmentDrawingLayout->addWidget(segmentDrawingCheckBox);
    
    826 821
     
    
    827
    -  warpingLayout = new QHBoxLayout;
    
    828
    -  warpingLayout->addSpacing(20); // XXX px
    
    829
    -  warpingLayout->addWidget(warpingCheckBox);
    
    830
    -
    
    831 822
       antiAliasingLayout = new QHBoxLayout;
    
    832 823
       antiAliasingLayout->addWidget(antiAliasingLabel);
    
    833 824
       antiAliasingLayout->addWidget(antiAliasingComboBoxx);
    
    ... ... @@ -852,7 +843,6 @@ MainGUI::createLayout()
    852 843
       generalTabLayout->addLayout(verticalHintingLayout);
    
    853 844
       generalTabLayout->addLayout(blueZoneHintingLayout);
    
    854 845
       generalTabLayout->addLayout(segmentDrawingLayout);
    
    855
    -  generalTabLayout->addLayout(warpingLayout);
    
    856 846
       generalTabLayout->addSpacing(20); // XXX px
    
    857 847
       generalTabLayout->addStretch(1);
    
    858 848
       generalTabLayout->addLayout(antiAliasingLayout);
    

  • src/ftinspect/maingui.hpp
    ... ... @@ -133,7 +133,6 @@ private:
    133 133
       QCheckBox *showPointNumbersCheckBox;
    
    134 134
       QCheckBox *showPointsCheckBox;
    
    135 135
       QCheckBox *verticalHintingCheckBox;
    
    136
    -  QCheckBox *warpingCheckBox;
    
    137 136
     
    
    138 137
       QComboBoxx *antiAliasingComboBoxx;
    
    139 138
       QComboBoxx *hintingModeComboBoxx;
    
    ... ... @@ -167,7 +166,6 @@ private:
    167 166
       QHBoxLayout *segmentDrawingLayout;
    
    168 167
       QHBoxLayout *sizeLayout;
    
    169 168
       QHBoxLayout *verticalHintingLayout;
    
    170
    -  QHBoxLayout *warpingLayout;
    
    171 169
     
    
    172 170
       QLabel *antiAliasingLabel;
    
    173 171
       QLabel *dpiLabel;
    


  • reply via email to

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