src/base/ftbitmap.c


Log

Author Commit Date CI Message
suzuki toshiya 1749d8bc 2012-01-17T02:00:24 Remove trailing spaces.
Werner Lemberg dfb475ab 2011-11-14T20:29:13 Fix compiler warning.
Werner Lemberg 9c98fbf6 2011-10-01T09:25:55 Handle some border cases. * include/freetype/config/ftstdlib.h (FT_USHORT_MAX): New macro. * src/base/ftbitmap.c (FT_Bitmap_Convert): Protect against invalid value of `target->rows'. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add check for flex start. * src/raster/ftrend1.c (ft_raster1_render): Check `width' and `height'. * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Protect against invalid values in `localpoints' array.
suzuki toshiya 65a44988 2011-06-15T01:44:24 [base] Fix g++4.6 compiler warnings in src/base/*.c. Passing uninitialized pointer to the buffer allocator is not problematic theoretically (as far as the returned pointer is checked before writing), but g++4.6 dislikes it and warns by -Wuninitialized. Initialize them by NULL. * src/base/ftobjs.c (FT_Stream_New): Init `stream'. (new_memory_stream): Ditto. (FT_New_GlyphSlot): Init `slot'. (FT_CMap_New): Init `cmap'. (open_face_PS_from_sfnt_stream): Init `sfnt_ps'. (Mac_Read_POST_Resource): Init `pfb_data'. (Mac_Read_sfnt_Resource): Init `sfnt_data'. * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Init `offsets_internal' and `ref'. (raccess_guess_darwin_hfsplus): Init `newpath'. (raccess_guess_darwin_newvfs): Ditto. * src/base/ftbitmap.c (ft_bitmap_assure_buffer): Init `buffer'. * src/base/ftstroke.c (FT_Stroker_New): Init `stroker'.
suzuki toshiya e866cf3f 2009-08-01T00:32:06 Improve bitmap size or pixel variables for 16-bit systems.
Werner Lemberg a86f1b96 2009-01-06T09:07:22 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>.
Werner Lemberg c8c4cc83 2008-12-17T10:50:31 * include/freetype/ftsynth.h, src/basae/ftsynth.c: Move FT_GlyphSlot_Own_Bitmap to... * include/freetype/ftbitmap.h, src/base/ftbitmap.c: These files. * docs/CHANGES: Document it.
David Turner 1dcb4448 2007-04-06T08:19:04 fixed a memory buffer overwrite bug. Damn !!
Werner Lemberg 24fd93d6 2007-03-29T11:56:21 formatting
David Turner 3f539694 2007-03-28T14:53:40 fixing bug in the padding zero-ing of the bitmap emboldener
Werner Lemberg 27cf9de1 2007-01-13T07:34:23 formatting, copyright years
David Turner e3654532 2007-01-13T00:19:18 * src/base/ftbitmap.c: fixing memory stomping bug in the bitmap embolderner when the pitch of the source bitmap is *much* larger than its width * src/truetype/ttinterp.c: fixing aliasing-related compilation warning
David Turner 9ca78256 2006-05-02T09:00:29 * include/freetype/internal/ftmemory.h, src/base/ftbitmap.c, src/base/ftmac.c, src/base/ftrfork.c, src/lzw/ftzopen.c, src/raster/ftrend1.c, src/sfnt/ttpost.c, src/truetype/ttgxvar.c, src/type42/t42parse.c, src/winfonts/winfnt.c: hardening the code against out-of-bounds conditions when allocating arrays. This is for the cases where FT_NEW_ARRAY and FT_RENEW_ARRAY are not used already. Introducing the new FT_ALLOC_MULT and FT_REALLOC_MULT macros.
Werner Lemberg be3c9814 2006-01-27T14:16:16 Formatting, copyright years.
David Turner 6a681fa8 2006-01-27T12:11:22 * src/autofit/afwarp.c: simple #ifdef to prevent compilation when the warp hinter isn't active (it shouldn't, still experimental) * Jamfile, include/freetype/config/ftmodule.h: removed "gxvalid" and "otvalid" from the list of modules that are linked statically to a given FreeType library. Functionality has been moved to the "ftvalid" CVS module. note also that current Make-based build system still compiles the modules though... * include/freetype/config/ftoption.h: added FT_STRICT_ALIASING, which controls the definitions of the memory management functions to avoid warnings with recent versions of GCC. this macro is only here to be disabled, in case we detect problems with the new scheme. NOTE: disable macro to use the memory debugger. this will be fixed later !!
David Turner c5621628 2005-06-30T11:46:46 * src/sfnt/ftbitmap.c, src/truetype/ttgload.c, src/sfnt/ttcmap.c: removing compiler warnings (Visual C++ /W4) * Jamfile, src/otvalid/{otvcommn.h,otvgdef.c,otvgpos.c,otvgsub.c, otvjstf.c}: modified the code to use a different pre-processor trick to implement the OTV_NEST1, OTV_NEST2 and OTV_NEST3 macros. The code now compiles neatly with Visual C++. The 'otvalid' module has been put in the Jamfile build again.
Werner Lemberg 38e82be1 2005-05-30T19:22:44 * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): Minor documentation improvements. * include/freetype/ftoutln.h (FT_Outline_Embolden): Fix typos. * src/base/ftbitmap.c (FT_Bitmap_Embolden): Add support for bitmap of pixel_mode FT_PIXEL_MODE_GRAY2 or FT_PIXEL_MODE_GRAY4. If xstr is larger than 8 and bitmap is of pixel_mode FT_PIXEL_MODE_MONO, set xstr to 8 instead of returning error.
Werner Lemberg 71d76281 2005-05-30T07:54:20 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Fix emboldening bitmap of mode FT_PIXEL_MODE_GRAY. Also add support for mode FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V. (ft_bitmap_assure_buffer): FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V should have ppb (pixel per byte) 1. Zero the padding when there's no need to allocate memory. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Handle slot->advance too. More suited emboldening strength.
Werner Lemberg c162eac5 2005-05-28T21:52:37 * src/base/ftbitmap.c (FT_Bitmap_Embolden): Handle negative pitch. Handle FT_PIXEL_MODE_GRAY with num_gray != 256. Improve speed for FT_PIXEL_MODE_GRAY. (ft_bitmap_assure_buffer): Accept FT_PIXEL_MODE_LCD and FT_PIXEL_MODE_LCD_V.
Werner Lemberg afb2ba57 2005-05-25T05:51:01 * docs/CHANGES: Updated. * include/freetype/ftbitmap.h (FT_Bitmap_Embolden): New declaration. * include/freetype/ftoutln.h (FT_Outline_Embolden): New declaration. * src/base/ftbitmap.c (ft_bitmap_assure_buffer): New auxiliary function. (FT_Bitmap_Embolden): New function. * src/base/ftoutln.c (FT_Outline_Embolden): New function. * src/base/ftsynth.c: Don't include FT_INTERNAL_CALC_H and FT_TRIGONOMETRY_H but FT_BITMAP_H. (FT_GlyphSlot_Embolden): Use FT_Outline_Embolden or FT_Bitmap_Embolden.
Werner Lemberg b9ee7370 2005-05-20T21:52:19 * docs/CHANGES: Updated. * src/base/ftbitmap.c: Don't include FT_FREETYPE_H and FT_IMAGE_H but FT_BITMAP_H. (FT_Bitmap_Copy): New function (from ftglyph.c). * include/freetype/ftbitmap.h (FT_Bitmap_Copy): New public definition. * src/base/ftglyph.c: Include FT_BITMAP_H. (ft_bitmap_copy): Move to ftbitmap.c. (ft_bitmap_glyph_init): Remove `memory' variable. Create new bitmap object if FT_GLYPH_OWN_BITMAP isn't set. (ft_bitmap_glyph_copy): Use FT_Bitmap_Copy. (ft_bitmap_glyph_done): Use FT_Bitmap_Done. (ft_outline_glyph_init): Use FT_Outline_Copy. * src/base/ftoutln.c (FT_Outline_Copy): Handle source == target. (FT_Outline_Done_Internal): Check for valid `memory' pointer. (FT_Outline_Translate, FT_Outline_Reverse, FT_Outline_Render, FT_Outline_Transform): Check for valid `outline' pointer. * src/base/ftobjs.c (FT_New_GlyphSlot): Prepend glyph slot to face->glyph, otherwise a new second glyph slot cannot be created. (FT_Done_GlyphSlot): Fix memory leak. (FT_Open_Face): Updated -- face->glyph is already managed by FT_New_GlyphSlot. * src/type42/t42objs.c (T42_GlyphSlot_Done): Updated.
Werner Lemberg 0358b21d 2005-02-10T16:59:37 Formatting.
David Turner e99b9a99 2005-02-10T16:11:29 * src/base/ftbitmap.c (FT_Bitmap_Convert): small improvements to the conversion function (mainly stupid optimization, because I like these... shame on me) * src/base/Jamfile: adding ftbitmap.c to the list of compiled files
Werner Lemberg 0f2a4157 2004-12-28T07:31:35 * src/base/ftbitmap.c (FT_Bitmap_Convert): Fix compiler warning.
Werner Lemberg f2438e1d 2004-12-14T16:01:29 * src/base/ftbitmap.c, include/freetype/ftbitmap.h: New files for handling various bitmap formats. * include/freetype/config/ftheader.h (FT_BITMAP_H): New macro. * src/base/rules.mk (BASE_EXT_SRC): Add ftbitmap.c. * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Don't convert bitmaps to 8bpp but return them as-is. * docs/CHANGES: Mention new bitmap API. * include/freetype/ftchapter.s: Updated.