diff --git a/[GSoC]ChangeLog b/[GSoC]ChangeLog index a4bf58866..2d606b02e 100644 --- a/[GSoC]ChangeLog +++ b/[GSoC]ChangeLog @@ -1,3 +1,12 @@ +2020-06-26 Anuj Verma + + * 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 * src/sdf/ftsdf.c (sdf_shape_dump): Use `FT_TRACEX' diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index 426b09441..72bf8c441 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 2aaf81287..d93df3de1 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 );