[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] anuj-distance-field 913766e 12/95: * include/freetype/ftimag
From: |
Anuj Verma |
Subject: |
[freetype2] anuj-distance-field 913766e 12/95: * include/freetype/ftimage.h (FT_RASTER_FLAG_): Added a new raster flag. |
Date: |
Sun, 2 Aug 2020 01:10:26 -0400 (EDT) |
branch: anuj-distance-field
commit 913766eefcbcac354a43b79459ad0e77784227fe
Author: Anuj Verma <anujv@iitbhilai.ac.in>
Commit: Anuj Verma <anujv@iitbhilai.ac.in>
* include/freetype/ftimage.h (FT_RASTER_FLAG_): Added a new raster flag.
---
[GSoC]ChangeLog | 9 +++++++++
include/freetype/ftimage.h | 6 ++++++
src/sdf/ftsdfrend.c | 2 +-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/[GSoC]ChangeLog b/[GSoC]ChangeLog
index a4bf588..2d606b0 100644
--- a/[GSoC]ChangeLog
+++ b/[GSoC]ChangeLog
@@ -1,5 +1,14 @@
2020-06-26 Anuj Verma <anujv@iitbhilai.ac.in>
+ * include/freetype/ftimage.h (FT_RASTER_FLAG_): Added
+ a new raster flag `FT_RASTER_FLAG_SDF'. The `ftsdf'
+ rasterizer will only render if this flag is set.
+
+ * src/sdf/ftsdfrend.c (ft_sdf_render): Set the `flags' field
+ of `FT_Raster_Params' to `FT_RASTER_FLAG_SDF'.
+
+2020-06-26 Anuj Verma <anujv@iitbhilai.ac.in>
+
* src/sdf/ftsdf.c (sdf_shape_dump): Use `FT_TRACEX'
instead of `printf'.
diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h
index 426b094..72bf8c4 100644
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -969,11 +969,17 @@ FT_BEGIN_HEADER
* will be clipped to a box specified in the `clip_box` field of the
* @FT_Raster_Params structure. Otherwise, the `clip_box` is
* effectively set to the bounding box and all spans are generated.
+ *
+ * FT_RASTER_FLAG_SDF ::
+ * This flag is set to indicate that a signed distance field glyph
+ * image should be generated. This is only used while rendering with
+ * `FT_RENDER_MODE_SDF' render mode.
*/
#define FT_RASTER_FLAG_DEFAULT 0x0
#define FT_RASTER_FLAG_AA 0x1
#define FT_RASTER_FLAG_DIRECT 0x2
#define FT_RASTER_FLAG_CLIP 0x4
+#define FT_RASTER_FLAG_SDF 0x8
/* these constants are deprecated; use the corresponding */
/* `FT_RASTER_FLAG_XXX` values instead */
diff --git a/src/sdf/ftsdfrend.c b/src/sdf/ftsdfrend.c
index 2aaf812..d93df3d 100644
--- a/src/sdf/ftsdfrend.c
+++ b/src/sdf/ftsdfrend.c
@@ -244,7 +244,7 @@
/* set up parameters */
params.target = bitmap;
params.source = outline;
- params.flags = 0;
+ params.flags = FT_RASTER_FLAG_SDF;
/* render the outline */
error = render->raster_render( render->raster, ¶ms );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] anuj-distance-field 913766e 12/95: * include/freetype/ftimage.h (FT_RASTER_FLAG_): Added a new raster flag.,
Anuj Verma <=