Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
e592982a
by Anuj Verma at 2021-07-13T10:00:22+02:00
2 changed files:
Changes:
... | ... | @@ -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.
|
... | ... | @@ -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,
|