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/ftcommon.c (FTDe


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype-demos][master] 2 commits: * src/ftcommon.c (FTDemo_Draw_Header): Show sizing errors again.
Date: Mon, 09 Jan 2023 04:57:10 +0000

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

Commits:

  • e1e334bc
    by Alexei Podtelezhnikov at 2023-01-08T23:21:50-05:00
    * src/ftcommon.c (FTDemo_Draw_Header): Show sizing errors again.
    
  • 657c7b5f
    by Alexei Podtelezhnikov at 2023-01-08T23:23:20-05:00
    * src/ftview.c: Remove obsolete comments.
    

2 changed files:

Changes:

  • src/ftcommon.c
    ... ... @@ -1213,11 +1213,10 @@
    1213 1213
         /* The demo programs are mainly investigation tools.  Normal          */
    
    1214 1214
         /* applications don't need all the extra validity checks to display   */
    
    1215 1215
         /* something for invalid fonts; instead, they can simply reject them. */
    
    1216
    -    if ( ( face->size                                      &&
    
    1217
    -           abs( ptsize * res / 64
    
    1218
    -                  - face->size->metrics.y_ppem * 72 ) > 36 ) ||
    
    1219
    -         error_code                                          )
    
    1216
    +    if ( abs( ptsize * res / 72 - ppem ) > 32 ||
    
    1217
    +         error_code                           )
    
    1220 1218
         {
    
    1219
    +      x = strbuf_len( buf );
    
    1221 1220
           strbuf_reset( buf );
    
    1222 1221
     
    
    1223 1222
           switch ( error_code )
    

  • src/ftview.c
    ... ... @@ -184,10 +184,7 @@
    184 184
     
    
    185 185
         error = FTDemo_Get_Size( handle, &size );
    
    186 186
         if ( error )
    
    187
    -    {
    
    188
    -      /* probably a non-existent bitmap font size */
    
    189 187
           return -1;
    
    190
    -    }
    
    191 188
     
    
    192 189
         INIT_SIZE( size, start_x, start_y, step_y, x, y );
    
    193 190
         face = size->face;
    
    ... ... @@ -292,10 +289,7 @@
    292 289
     
    
    293 290
         error = FTDemo_Get_Size( handle, &size );
    
    294 291
         if ( error )
    
    295
    -    {
    
    296
    -      /* probably a non-existent bitmap font size */
    
    297 292
           return -1;
    
    298
    -    }
    
    299 293
     
    
    300 294
         INIT_SIZE( size, start_x, start_y, step_y, x, y );
    
    301 295
         face = size->face;
    
    ... ... @@ -438,10 +432,7 @@
    438 432
     
    
    439 433
         error = FTDemo_Get_Size( handle, &size );
    
    440 434
         if ( error )
    
    441
    -    {
    
    442
    -      /* probably a non-existent bitmap font size */
    
    443 435
           return -1;
    
    444
    -    }
    
    445 436
     
    
    446 437
         INIT_SIZE( size, start_x, start_y, step_y, x, y );
    
    447 438
         face = size->face;
    
    ... ... @@ -626,10 +617,7 @@
    626 617
     
    
    627 618
         error = FTDemo_Get_Size( handle, &size );
    
    628 619
         if ( error )
    
    629
    -    {
    
    630
    -      /* probably a non-existent bitmap font size */
    
    631 620
           return -1;
    
    632
    -    }
    
    633 621
     
    
    634 622
         INIT_SIZE( size, start_x, start_y, step_y, x, y );
    
    635 623
     
    
    ... ... @@ -1079,10 +1067,7 @@
    1079 1067
     
    
    1080 1068
         error = FTDemo_Get_Size( handle, &size );
    
    1081 1069
         if ( error )
    
    1082
    -    {
    
    1083
    -      /* probably a non-existent bitmap font size */
    
    1084 1070
           return 0;
    
    1085
    -    }
    
    1086 1071
     
    
    1087 1072
         face = size->face;
    
    1088 1073
     
    


  • reply via email to

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