freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [sdf] Improve documentation.


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] [sdf] Improve documentation.
Date: Tue, 13 Jul 2021 08:01:48 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • include/freetype/freetype.h
    ... ... @@ -3307,13 +3307,13 @@ FT_BEGIN_HEADER
    3307 3307
        *     pixels and use the @FT_PIXEL_MODE_LCD_V mode.
    
    3308 3308
        *
    
    3309 3309
        *   FT_RENDER_MODE_SDF ::
    
    3310
    -   *     This mode corresponds to 8-bit signed distance fields (SDF)
    
    3311
    -   *     bitmaps.  Each pixel in a SDF bitmap contains information about the
    
    3312
    -   *     nearest edge of the glyph outline.  The distances are calculated
    
    3313
    -   *     from the center of the pixel and are positive if they are filled by
    
    3314
    -   *     the outline (i.e., inside the outline) and negative otherwise.
    
    3315
    -   *     Check the note below on how to convert the output values to usable
    
    3316
    -   *     data.
    
    3310
    +   *     This mode corresponds to 8-bit, single-channel signed distance field
    
    3311
    +   *     (SDF) bitmaps.  Each pixel in the SDF grid is the value from the
    
    3312
    +   *     pixel's position to the nearest glyph's outline.  The distances are
    
    3313
    +   *     calculated from the center of the pixel and are positive if they are
    
    3314
    +   *     filled by the outline (i.e., inside the outline) and negative
    
    3315
    +   *     otherwise.  Check the note below on how to convert the output values
    
    3316
    +   *     to usable data.
    
    3317 3317
        *
    
    3318 3318
        * @note:
    
    3319 3319
        *   The selected render mode only affects vector glyphs of a font.
    

  • src/sdf/ftsdf.c
    ... ... @@ -41,7 +41,8 @@
    41 41
        *     file `ftbsdf.c` for more.
    
    42 42
        *
    
    43 43
        *   * The basic idea of generating the SDF is taken from Viktor Chlumsky's
    
    44
    -   *     research paper.
    
    44
    +   *     research paper.  The paper explains both single and multi-channel
    
    45
    +   *     SDF, however, this implementation only generates single-channel SDF.
    
    45 46
        *
    
    46 47
        *       Chlumsky, Viktor: Shape Decomposition for Multi-channel Distance
    
    47 48
        *       Fields.  Master's thesis.  Czech Technical University in Prague,
    


  • reply via email to

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