FT_Bitmap_Convert: Support missing pixel modes.

* src/base/ftbitmap.c (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_LCD
and FT_PIXEL_MODE_LCD_V.  Problem reported by Chi Nguyen
<chint@necsv.com>.
This commit is contained in:
Werner Lemberg 2009-01-06 09:07:22 +00:00
parent c679115f0d
commit a86f1b96b5
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2009-01-06 Werner Lemberg <wl@gnu.org>
* src/base/ftbitmap.c (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_LCD
and FT_PIXEL_MODE_LCD_V. Problem reported by Chi Nguyen
<chint@necsv.com>.
2009-01-06 Diego Pettenò <flameeyes@gmail.com>
* builds/unix/configure.raw: Don't call AC_CANONICAL_BUILD and

View File

@ -4,7 +4,7 @@
/* */
/* FreeType utility functions for bitmaps (body). */
/* */
/* Copyright 2004, 2005, 2006, 2007, 2008 by */
/* Copyright 2004, 2005, 2006, 2007, 2008, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -388,6 +388,8 @@
case FT_PIXEL_MODE_GRAY:
case FT_PIXEL_MODE_GRAY2:
case FT_PIXEL_MODE_GRAY4:
case FT_PIXEL_MODE_LCD:
case FT_PIXEL_MODE_LCD_V:
{
FT_Int pad;
FT_Long old_size;
@ -482,6 +484,8 @@
case FT_PIXEL_MODE_GRAY:
case FT_PIXEL_MODE_LCD:
case FT_PIXEL_MODE_LCD_V:
{
FT_Int width = source->width;
FT_Byte* s = source->buffer;