freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] 2 commits: [bdf, pcf] Minor optimizatio


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] 2 commits: [bdf, pcf] Minor optimization.
Date: Thu, 23 Sep 2021 02:24:21 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

4 changed files:

Changes:

  • include/freetype/freetype.h
    ... ... @@ -2186,6 +2186,10 @@ FT_BEGIN_HEADER
    2186 2186
        *   FreeType error code.  0~means success.
    
    2187 2187
        *
    
    2188 2188
        * @note:
    
    2189
    +   *   The `pathname` string should be reconizable as such by a standard
    
    2190
    +   *   `fopen()` call on your system.  If that is not sufficient to address
    
    2191
    +   *   all file name possiblities, you can use @FT_Open_Face.
    
    2192
    +   *
    
    2189 2193
        *   Use @FT_Done_Face to destroy the created @FT_Face object (along with
    
    2190 2194
        *   its slot and sizes).
    
    2191 2195
        */
    

  • src/bdf/bdfdrivr.c
    ... ... @@ -487,7 +487,7 @@ THE SOFTWARE.
    487 487
             else
    
    488 488
             {
    
    489 489
               /* this is a heuristical value */
    
    490
    -          bsize->width = (FT_Short)FT_MulDiv( bsize->height, 2, 3 );
    
    490
    +          bsize->width = ( bsize->height * 2 + 1 ) / 3;
    
    491 491
             }
    
    492 492
     
    
    493 493
             prop = bdf_get_font_property( font, "POINT_SIZE" );
    

  • src/bdf/bdflib.c
    ... ... @@ -1615,7 +1615,7 @@
    1615 1615
           goto Exit;
    
    1616 1616
         }
    
    1617 1617
     
    
    1618
    -    /* Expect the DWIDTH (scalable width) field next. */
    
    1618
    +    /* Expect the DWIDTH (device width) field next. */
    
    1619 1619
         if ( _bdf_strncmp( line, "DWIDTH", 6 ) == 0 )
    
    1620 1620
         {
    
    1621 1621
           error = _bdf_list_split( &p->list, " +", line, linelen );
    

  • src/pcf/pcfread.c
    ... ... @@ -1612,7 +1612,7 @@ THE SOFTWARE.
    1612 1612
             else
    
    1613 1613
             {
    
    1614 1614
               /* this is a heuristical value */
    
    1615
    -          bsize->width = (FT_Short)FT_MulDiv( bsize->height, 2, 3 );
    
    1615
    +          bsize->width = ( bsize->height * 2 + 1 ) / 3;
    
    1616 1616
             }
    
    1617 1617
     
    
    1618 1618
             prop = pcf_find_property( face, "POINT_SIZE" );
    


  • reply via email to

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