freetype2/src/base
Shao Yu Zhang f04d81751a [sfnt] Preliminary support of coloured layer outlines.
This commit enables OpenType's COLR/CPAL table handling; a typical
application are color emojis that can be scaled to any size.

If the color palette does not exist or is invalid, the rendering
step rasterizes the outline instead.  The current implementation
assumes that the foreground is black.

Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS.

There are still some issues with metrics; additionally, an API to
fetch color layers is missing.

* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_COLOR_LAYERS): New macro.

* include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec,
FT_Colr_InternalRec): New structures.
(FT_Slot_InternalRec): Add `color_layers' field.

* include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func,
TT_Blend_Colr_Func): New function types.
(SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer',
and `colr_blend' fields.

* include/freetype/internal/tttypes.h (TT_FaceRec): Add
`colr_and_cpal' field.

* include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New
macros.

* src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files.

* src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal):
Handle glyph color layers.

* src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add
`ttcolr.c'.

* src/sfnt/sfdriver.c: Include `ttcolr.h'.
(PUT_COLOR_LAYERS): New macro.
Update call to `FT_DEFINE_SFNT_INTERFACE'.

* src/sfnt/sfnt.c: Include `ttcolr.c'.

* src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables.
(sfnt_done_face): Updated.

* src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers.
2018-05-13 03:25:09 +02:00
..
Jamfile Make `ftlcdfil.c' part of the `base' module. 2018-03-05 23:37:17 +01:00
ftadvanc.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftapi.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftbase.c Remove FT_CONFIG_OPTION_PIC and related code. 2018-05-02 20:27:48 +02:00
ftbase.h Update copyright year. 2018-01-02 09:33:57 +01:00
ftbbox.c Remove FT_CONFIG_OPTION_PIC and related code. 2018-05-02 20:27:48 +02:00
ftbdf.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftbitmap.c [base] Fix bitmap emboldening. 2018-04-22 17:22:35 +02:00
ftcalc.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftcid.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftdbgmem.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftdebug.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftfntfmt.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftfstype.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftgasp.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftgloadr.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftglyph.c Remove FT_CONFIG_OPTION_PIC and related code. 2018-05-02 20:27:48 +02:00
ftgxval.c Update copyright year. 2018-01-02 09:33:57 +01:00
fthash.c * src/base/fthash.c: Include FT_INTERNAL_MEMORY_H. 2016-02-14 20:48:59 +01:00
ftinit.c Remove FT_CONFIG_OPTION_PIC and related code. 2018-05-02 20:27:48 +02:00
ftlcdfil.c [base] Avoid undefined behaviour in lcd filtering code (#53727). 2018-04-24 10:29:19 +02:00
ftmac.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftmm.c Add `FT_Done_MM_Var'. 2018-01-06 08:39:36 +01:00
ftobjs.c [sfnt] Preliminary support of coloured layer outlines. 2018-05-13 03:25:09 +02:00
ftotval.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftoutln.c * src/base/ftoutln.c (FT_Outline_Decompose): Improve error tracing. 2018-04-22 21:15:10 +02:00
ftpatent.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftpfr.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftpsprop.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftrfork.c Remove FT_CONFIG_OPTION_PIC and related code. 2018-05-02 20:27:48 +02:00
ftsnames.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftstream.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftstroke.c Remove FT_CONFIG_OPTION_PIC and related code. 2018-05-02 20:27:48 +02:00
ftsynth.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftsystem.c Update copyright year. 2018-01-02 09:33:57 +01:00
fttrigon.c Update copyright year. 2018-01-02 09:33:57 +01:00
fttype1.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftutil.c Update copyright year. 2018-01-02 09:33:57 +01:00
ftver.rc * Version 2.9.1 released. 2018-05-01 20:37:24 +02:00
ftwinfnt.c Update copyright year. 2018-01-02 09:33:57 +01:00
md5.c * src/base/md5.c: Updated to recent version. 2016-06-16 06:17:54 +02:00
md5.h * src/base/md5.c, src/base/md5.h: Updated to recent version. 2013-10-22 01:10:10 +02:00
rules.mk Remove FT_CONFIG_OPTION_PIC and related code. 2018-05-02 20:27:48 +02:00