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/psaux/pshints.c (cf2_h


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] 2 commits: * src/psaux/pshints.c (cf2_hintmap_build): Improve debugging output.
Date: Fri, 30 Sep 2022 21:28:24 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

  • 2adb810c
    by Werner Lemberg at 2022-09-30T17:00:10+02:00
    * src/psaux/pshints.c (cf2_hintmap_build): Improve debugging output.
    
  • de8f14a8
    by Werner Lemberg at 2022-09-30T23:25:02+02:00
    * src/psaux/pshints.c (cf2_hintmap_insertHint): Fix midpoint computation.
    
    Replace '(start + end) / 2' with 'start + (end - start) / 2' to avoid
    overflow.
    
    Fixes #1180.
    

1 changed file:

Changes:

  • src/psaux/pshints.c
    ... ... @@ -693,8 +693,10 @@
    693 693
             CF2_Fixed  midpoint =
    
    694 694
                          cf2_hintmap_map(
    
    695 695
                            hintmap->initialHintMap,
    
    696
    -                       ADD_INT32( secondHintEdge->csCoord,
    
    697
    -                                  firstHintEdge->csCoord ) / 2 );
    
    696
    +                       ADD_INT32(
    
    697
    +                         firstHintEdge->csCoord,
    
    698
    +                         SUB_INT32 ( secondHintEdge->csCoord,
    
    699
    +                                     firstHintEdge->csCoord ) / 2 ) );
    
    698 700
             CF2_Fixed  halfWidth =
    
    699 701
                          FT_MulFix( SUB_INT32( secondHintEdge->csCoord,
    
    700 702
                                                firstHintEdge->csCoord ) / 2,
    
    ... ... @@ -1034,10 +1036,10 @@
    1034 1036
         {
    
    1035 1037
           FT_TRACE6(( "flags: [p]air [g]host [t]op"
    
    1036 1038
                       " [b]ottom [L]ocked [S]ynthetic\n" ));
    
    1037
    -      FT_TRACE6(( "Initial hintmap" ));
    
    1039
    +      FT_TRACE6(( "Initial hintmap:\n" ));
    
    1038 1040
         }
    
    1039 1041
         else
    
    1040
    -      FT_TRACE6(( "Hints:" ));
    
    1042
    +      FT_TRACE6(( "Hints:\n" ));
    
    1041 1043
     #endif
    
    1042 1044
     
    
    1043 1045
         cf2_hintmap_dump( hintmap );
    
    ... ... @@ -1054,7 +1056,7 @@
    1054 1056
         /* adjust positions of hint edges that are not locked to blue zones */
    
    1055 1057
         cf2_hintmap_adjustHints( hintmap );
    
    1056 1058
     
    
    1057
    -    FT_TRACE6(( "(adjusted)\n" ));
    
    1059
    +    FT_TRACE6(( "Hints adjusted:\n" ));
    
    1058 1060
         cf2_hintmap_dump( hintmap );
    
    1059 1061
     
    
    1060 1062
         /* save the position of all hints that were used in this hint map; */
    


  • reply via email to

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