[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master e592982: [sdf] Improve documentation.
From: |
Werner Lemberg |
Subject: |
[freetype2] master e592982: [sdf] Improve documentation. |
Date: |
Tue, 13 Jul 2021 04:01:49 -0400 (EDT) |
branch: master
commit e592982a836c41050600d63ecf449ff8ab6a9a76
Author: Anuj Verma <anujv@iitbhilai.ac.in>
Commit: Werner Lemberg <wl@gnu.org>
[sdf] Improve documentation.
---
include/freetype/freetype.h | 14 +++++++-------
src/sdf/ftsdf.c | 3 ++-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 29a0f71..f393e3d 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -3307,13 +3307,13 @@ FT_BEGIN_HEADER
* pixels and use the @FT_PIXEL_MODE_LCD_V mode.
*
* FT_RENDER_MODE_SDF ::
- * This mode corresponds to 8-bit signed distance fields (SDF)
- * bitmaps. Each pixel in a SDF bitmap contains information about the
- * nearest edge of the glyph outline. The distances are calculated
- * from the center of the pixel and are positive if they are filled by
- * the outline (i.e., inside the outline) and negative otherwise.
- * Check the note below on how to convert the output values to usable
- * data.
+ * This mode corresponds to 8-bit, single-channel signed distance field
+ * (SDF) bitmaps. Each pixel in the SDF grid is the value from the
+ * pixel's position to the nearest glyph's outline. The distances are
+ * calculated from the center of the pixel and are positive if they are
+ * filled by the outline (i.e., inside the outline) and negative
+ * otherwise. Check the note below on how to convert the output values
+ * to usable data.
*
* @note:
* The selected render mode only affects vector glyphs of a font.
diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c
index 65a8f32..d3722b1 100644
--- a/src/sdf/ftsdf.c
+++ b/src/sdf/ftsdf.c
@@ -41,7 +41,8 @@
* file `ftbsdf.c` for more.
*
* * The basic idea of generating the SDF is taken from Viktor Chlumsky's
- * research paper.
+ * research paper. The paper explains both single and multi-channel
+ * SDF, however, this implementation only generates single-channel SDF.
*
* Chlumsky, Viktor: Shape Decomposition for Multi-channel Distance
* Fields. Master's thesis. Czech Technical University in Prague,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master e592982: [sdf] Improve documentation.,
Werner Lemberg <=