Commit Graph

9 Commits

Author SHA1 Message Date
Anuj Verma f2553d89b2 [sdf,bsdf] Put common propertied and functions in one file.
* src/sdf/ftsdfcommon.h: Added new file which contains
  common function, macros, properties for both `sdf' and
  `bsdf' renderer.

* src/sdf/ftsdf.c, src/sdf/ftsdf.h, src/sdf/ftbsdf.c:
  Remove common properties and include `ftsdfcommon.h'.

* src/sdf/rules.mk (SDF_DRV_H): Add the new `ftsdfcommon.h'
  file to include list.
2020-08-02 16:33:21 +05:30
Anuj Verma 6ccbf0ecf6 [sdf] Fix GNU Make build.
* src/sdf/rules.mk (SDF_DRV_H): Manually add source files
  as there is a `ftbsdf.c' file without any `ftbsdf.h'.

* src/sdf/ftbsdf.c: Include `fttrigon.h' for `multi' builds.
2020-08-02 16:33:21 +05:30
Anuj Verma 1d51c5ef7b [sdf] Added interface functions for `bsdf' converter.
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Remove
  the bitmap check which prevent calling renderers
  if the glyph is already a bitmap. The `bsdf' renderer
  requires a bitmap for conversion.

* src/base/ftobjs.c (ft_add_renderer): Remove the glyph
  format check which ensures that the glyph format for
  a renderer is `FT_GLYPH_FORMAT_OUTLINE', again the `bsdf'
  renderer has `FT_GLYPH_FORMAT_BITMAP' as a glyph format,
  so we need to remove the condition to initialize the
  renderer properly.

* src/sdf/ftbsdf.c (*): Added a rasterizer for the
  `bsdf' renderer and created necessary functions.

* src/sdf/ftbsdf.h: Add forward declaration of the
  rasterizer.

* src/sdf/ftsdfrend.c (ft_bitmap_sdf_renderer_class):
  Define the new `bsdf' rendere and add the
  `FT_Renderer_RenderFunc' function, the rest is
  same as the `sdf' renderer.

* src/sdf/ftsdfrend.h: Add forward declaration of the
  renderer.

* src/sdf/rules.mk (SDF_DRV_SRC): Add the new `ftbsdf.c'
  file to the compile list.

* src/sdf/sdf.c: Inclue the `ftbsdf.c' file if making
  single object.
2020-08-02 16:33:20 +05:30
Anuj Verma c09257f0dd [sdfb] Removed Module.
Remove sdfb module. Instead of a new module
simply create a new renderer in the `sdf'
module for converting bitmaps to SDF.
2020-08-02 16:33:20 +05:30
Anuj Verma 80ba40341c Revert "[sdfb] Added new module to generate SDF from bitmap."
This reverts commit 2136eddbccfa59b7478d87fe0947b35ca6a157f8.
2020-08-02 16:33:20 +05:30
Anuj Verma 04f2a34a7d [sdfb] Added new module to generate SDF from bitmap.
* src/sdfb/sdfb.c, src/sdfb/ftsdfbrend.c,
  src/sdfb/ftsdfb.c, src/sdfb/ftsdfbrend.h,
  src/sdfb/ftsdfb.h, src/sdfb/ftsdfberrs.h:
  Added files required by the `sdfb' renderer module.

* src/sdfb/rules.mk, src/sdfb/module.mk: Added
  files required to build the `sdfb' module using
  the default build system.

* CMakeLists.txt (BASE_SRCS): Add `src/sdfb/sdfb.c'
  to the variable.

* include/freetype/config/ftmodule.h: Added `sdfb'
  module declaration so that the module can be compiled
  when not compiling with GNU make.

* modules.cfg (RASTER_MODULES): Include `sdfb' module
  to the default rasterizer module list.

* include/freetype/ftmoderr.h: sdfb module error define

* src/sdf/rules.mk: Add EOF.
2020-08-02 16:33:20 +05:30
Anuj Verma 38df99a1b4 [sdf] Fixed compilation under gnumake. 2020-08-02 16:33:17 +05:30
Anuj Verma 08ba8d1422 added new `FT_RENDER_MODE_SDF' 2020-08-02 16:33:16 +05:30
preversewharf45 185d07b0cd added the structure of new `sdf' module 2020-08-02 16:33:16 +05:30