2020-06-27 10:43:05 +02:00
|
|
|
2020-06-26 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Added `SDF_Raster_Params' struct which extends
|
|
|
|
`FT_Raster_Params' and has a few extra fields. This is done
|
|
|
|
to pass extra data to the sdf rasterzier which is required
|
|
|
|
while rastersizing.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.h (SDF_Raster_Params): Added a struct which
|
|
|
|
extends `FT_Raster_Params' and has the `spread' parameter.
|
|
|
|
Also moved the max, min and default spread values to this
|
|
|
|
header file.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_raster_render): Added parameter and
|
|
|
|
attribute checking in order to pick errors and return
|
|
|
|
early.
|
|
|
|
|
|
|
|
* src//sdf/ftsdfrend.c (ft_sdf_render): Setup the `SDF_Raster_Params'
|
|
|
|
and pass it to the rasterizer instead of `FT_Raster_Params'.
|
|
|
|
|
2020-06-27 05:20:39 +02:00
|
|
|
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 08:04:41 +02:00
|
|
|
2020-06-26 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_shape_dump): Use `FT_TRACEX'
|
|
|
|
instead of `printf'.
|
|
|
|
|
2020-06-26 06:37:16 +02:00
|
|
|
2020-06-26 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_shape_dump): Added function to
|
|
|
|
dump the `SDF_Shape' on the console for debugging.
|
|
|
|
|
2020-06-26 05:53:49 +02:00
|
|
|
2020-06-26 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Added functions to de-allocate `SDF_' structs.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (SDF_Contour, SDF_Shape): Use `FT_ListRec'
|
|
|
|
instead of `FT_List' to avoid a few extra allocations.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (SDF_Edge, SDF_Contour, SDF_Shape): Added
|
2020-06-26 06:37:16 +02:00
|
|
|
functions to de-allocate these structs and their members.
|
2020-06-26 05:53:49 +02:00
|
|
|
|
|
|
|
* src/sdf/ftsdfrenc.c: Typo.
|
|
|
|
|
2020-06-25 13:31:21 +02:00
|
|
|
2020-06-25 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Decompose outline and store it in a temporary
|
|
|
|
`SDF_Shape' object for easy iteration and pre-computing
|
|
|
|
some variables.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_outline_decompose): Added function
|
|
|
|
to decompost outline and store it in a `SDF_Shape' object.
|
|
|
|
This allows us to pre-compute some variable.
|
|
|
|
|
2020-06-25 06:51:59 +02:00
|
|
|
2020-06-25 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Added essential enums and structs required.
|
|
|
|
|
|
|
|
* src/freetype/internal/fttrace.h: Remove tabs.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.c (ft_sdf_render): Calculate padding
|
|
|
|
using the `spread'.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (SDF_Edge_Type, SDF_Edge, SDF_Contour,
|
|
|
|
SDF_Shape): Added structures and their initializer
|
|
|
|
functions.
|
|
|
|
|
2020-06-23 07:52:10 +02:00
|
|
|
2020-06-23 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Added functionality to set and get module properties.
|
|
|
|
Also added a `spread' property.
|
|
|
|
|
|
|
|
* src/freetype/internal/fttrace.h: Added sdf module trace
|
|
|
|
define.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_TRaster => SDF_TRaster): Use capital
|
|
|
|
character for structs.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.h (SDF_Renderer_Module): Added a struct
|
|
|
|
which extends the `FT_RendererRec' and added the `spread'
|
|
|
|
property.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.c: Synchronized the code to use the new
|
|
|
|
`SDF_Renderer_Module' and added functions to get/set the
|
|
|
|
properties.
|
|
|
|
|
|
|
|
|
2020-06-20 07:00:39 +02:00
|
|
|
2020-06-20 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Implemented a few functions required by a renderer
|
|
|
|
module.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_TRaster_): Added new structure to hold
|
|
|
|
the memory allocator `FT_Memory'.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (ft_sdf_raster): Implemented a few essential
|
|
|
|
functions required by `FT_Raster'.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.c (ft_sdf_renderer_class): Implemented a few
|
|
|
|
essential functions required by `FT_Renderer'.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.c (ft_sdf_render): Added functionality to
|
|
|
|
compute shift and padding before rendering the outline.
|
|
|
|
|
2020-06-19 13:20:24 +02:00
|
|
|
2020-06-19 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
* include/freetype/ftimage.h (FT_Render_Mode_): Added new
|
|
|
|
pixel mode `FT_PIXEL_MODE_GRAY16' which will be used
|
|
|
|
to represent signed values while rendering to SDF bitmap.
|
|
|
|
|
2020-06-19 05:56:41 +02:00
|
|
|
2020-06-19 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
* include/freetype/freetype.h (FT_Render_Mode_): Added new
|
|
|
|
rendermode `FT_RENDER_MODE_SDF' which will be used by the
|
|
|
|
`sdf' module to generate signed distance fields from glyph's
|
|
|
|
outline.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.h, src/sdf/module.mk, src/sdf/rules.mk:
|
|
|
|
Add a new line at the end of files.
|
|
|
|
|
2020-06-18 06:46:40 +02:00
|
|
|
2020-06-18 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Added the structure of a new module to render
|
2020-06-18 06:54:13 +02:00
|
|
|
signed distance fields.
|
2020-06-18 06:46:40 +02:00
|
|
|
|
|
|
|
* src/sdf/sdf.c, src/sdf/ftsdfrend.c, src/sdf/ftsdf.c,
|
|
|
|
src/sdf/ftsdfrend.h, src/sdf/ftsdf.h, src/sdf/ftsdferrs.h:
|
|
|
|
Added files required by the `sdf' renderer module and added
|
|
|
|
the basic structure and functions required.
|
|
|
|
|
|
|
|
* src/sdf/rules.mk, src/sdf/module.mk: Added files required to
|
|
|
|
build the `sdf' module using the default build system.
|
|
|
|
|
2020-06-20 07:00:39 +02:00
|
|
|
* CMakeLists.txt (BASE_SRCS): Add `src/sdf/sdf.c' to the variable.
|
2020-06-18 06:46:40 +02:00
|
|
|
|
|
|
|
* include/freetype/config/ftmodule.h: Added `sdf' module
|
2020-06-18 06:54:13 +02:00
|
|
|
declaration so that the module can be compiled when not compiling
|
2020-06-18 06:46:40 +02:00
|
|
|
with GNU make.
|
|
|
|
|
|
|
|
* modules.cfg (RASTER_MODULES): Include `sdf' module to the default
|
|
|
|
rasterizer module list.
|
|
|
|
|
2020-06-18 06:54:13 +02:00
|
|
|
* include/freetype/ftmoderr.h: sdf module error define
|