freetype2/builds/unix
Behdad Esfahbod 760d342d37 Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification

  https://color-emoji.googlecode.com/git/specification/v1.html

which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively).  The color bitmaps
are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA
pre-multiplied sRGB images.  If PNG support is available, PNG color
images as defined in the same proposed specification are supported
also.

Note that color bitmaps are converted to grayscale if client didn't
ask for color.

* builds/unix/configure.raw: Search for libpng.
Add `--without-png' option.

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

* include/freetype/freetype.h (FT_LOAD_COLOR): New load flag.

* include/freetype/ftimage.h (FT_Pixel_Mode): Add
`FT_PIXEL_MODE_BGRA'.

* include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags.

* src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated.
(ft_gray_for_premultiplied_srgb_bgra): New function.
(FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA.

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

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

* src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h'
(tt_face_load_eblc): Load `CBLC'.
(tt_sbit_decoder_init): Load `CBDT'.
(tt_sbit_decoder_alloc_bitmap): Pass load flags to select between
color and grayscale bitmaps.
Set `num_grays'.  This is used by `ftview' to choose the blending
algorithm.
(tt_sbit_decoder_load_byte_aligned,
tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound,
tt_sbit_decoder_load_image): Pass load flag.
s/write/pwrite/.
Don't call `tt_sbit_decoder_alloc_bitmap'.
Updated.
(tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function.
(tt_sbit_decoder_load_bitmap): Pass load flag.
Handle new glyph formats 17, 18, and 19.
Call `tt_sbit_decoder_alloc_bitmap'.
Flatten color bitmaps if necessary.
(tt_face_load_sbit_image): Updated.

* src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'.

* docs/CHANGES: Updated.
2013-05-29 11:36:18 +02:00
..
.gitignore Automake component `builds/unix/install-sh' is removed. 2011-05-16 12:47:25 +09:00
configure.raw Add support for color embedded bitmaps (eg. color emoji). 2013-05-29 11:36:18 +02:00
detect.mk Respect CONFIG_SHELL from the environment. 2013-03-21 19:58:40 +01:00
freetype-config.in Fix Savannah bug #38235. 2013-02-08 12:49:41 +01:00
freetype2.in Fix Savannah bug #38235. 2013-02-08 12:49:41 +01:00
freetype2.m4 Fix AC_CHECK_FT2. 2009-04-21 22:51:07 +02:00
ft-munmap.m4 Add license. 2005-06-04 23:04:30 +00:00
ft2unix.h Normalize quotation to `...'. 2006-03-24 12:46:49 +00:00
ftconfig.in Introduce unsigned 64bit type (if available). 2013-05-12 07:27:48 +02:00
ftsystem.c Update more FT_Err_XXX macros using FT_ERR and FT_THROW; 2013-05-17 17:40:27 +02:00
install.mk * builds/unix/install.mk (uninstall): Don't handle `cache' 2006-04-01 05:22:07 +00:00
mkinstalldirs * Version 2.3.10 released. 2009-10-06 12:00:43 +02:00
unix-cc.in Ignore the environmental setting of LIBTOOL. 2010-08-31 18:32:03 +09:00
unix-def.in Respect CONFIG_SHELL from the environment. 2013-03-21 19:58:40 +01:00
unix-dev.mk Implement new, simplified module selection. With GNU make it is now 2006-01-31 20:17:42 +00:00
unix-lcc.mk Completely revised FreeType's make management. 2003-06-09 04:46:30 +00:00
unix.mk Implement new, simplified module selection. With GNU make it is now 2006-01-31 20:17:42 +00:00
unixddef.mk * builds/*/*def.mk, builds/*/detect.mk (CAT): Define to either `cat' 2006-12-09 20:01:43 +00:00