src/gzip/ftgzip.c


Log

Author Commit Date CI Message
Oran Agra 1dcd0f23 2009-04-05T18:25:14 Add #error to modules and files that do not support PIC yet. When FT_CONFIG_OPTION_PIC is defined the following files will create #error: * src/bdf/bdfdrivr.h * src/cache/ftcmanag.c * src/cid/cidriver.h * src/gxvalid/gxvmod.h * src/gzip/ftgzip.c * src/lzw/ftlzw.c * src/otvalid/otvmod.h * src/pcf/pcfdrivr.h * src/pfr/pfrdrivr.h * src/psaux/psauxmod.h * src/type1/t1driver.h * src/type42/t42drivr.h * src/winfonts/winfnt.h
Werner Lemberg b66efefd 2009-03-12T08:07:49 Fix some FreeType Coverity issues as reported for Ghostscript. * src/base/ftobjs.c (FT_New_Face, FT_New_Memory_Face): Initialize `args.stream' (#3874, #3875). (open_face_PS_from_sfnt_stream): Improve error management (#3786). * src/base/ftmm.c (ft_face_get_mm_service): Fix check of `aservice' (#3870). * src/base/ftstroke.c (ft_stroke_border_get_counts): Remove dead code (#3790). * src/base/ftrfork.c (raccess_guess_apple_generic): Check error value of `FT_Stream_Skip' (#3784). * src/type1/t1gload.c (T1_Load_Glyph): Check `size' before accessing it (#3872) * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Check `face' before accessing it (#3871). * src/pcf/pcfread.c (pcf_get_metrics): Handle return value of `pcf_get_metric' (#3789, #3782). (pcf_get_properties): Use FT_STREAM_SKIP (#3783). * src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Fix check of `acache' (#3797) * src/cff/cffdrivr.c (cff_ps_get_font_info): Fix check of `cff' (#3796). * src/cff/cffgload.c (cff_decoder_prepare): Check `size' (#3795). * src/cff/cffload.c (cff_index_get_pointers): Add comment (#3794). * src/bdf/bdflib.c (_bdf_add_property): Check `fp->value.atom' (#3793). (_bdf_parse_start): Add comment (#3792). * src/raster/ftraster.c (Finalize_Profile_Table): Check `ras.fProfile' (#3791). * src/sfnt/ttsbit.c (Load_SBit_Image): Use FT_STREAM_SKIP (#3785). * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Properly ignore seek error (#3781).
Werner Lemberg 24d72a1b 2009-01-13T17:34:48 Don't use stdlib.h and friends directly. Reported by Mickey Gabel <mickey@monfort.co.il>. * src/base/ftdbgmem.c: s/<stdlib.h>/FT_CONFIG_STANDARD_LIBRARY_H/. * src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/raster/ftmisc.h: s/<string.h>/FT_CONFIG_STANDARD_LIBRARY_H/. * src/autofit/aftypes.h, src/autofit/afhints.c, src/pshinter/pshalgo.c: s/<stdio.h>/FT_CONFIG_STANDARD_LIBRARY_H/ * src/lzw/ftlzw.c, src/base/ftdbgmem.c: Don't include stdio.h.
Werner Lemberg 545c4e56 2006-05-17T22:55:04 * src/truetype/ttgload.c (TT_Load_Composite_Glyph) [FT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Make it compilable again. Formatting, documentation fixes.
David Turner 281679de 2006-05-17T13:34:21 * include/freetype/internal/tttypes.h, src/autofit/afangles.c, src/autofit/afcjk.c, src/autofit/afhints.c, src/autofit/aflatin.c, src/autofit/aftypes.h, src/base/ftcalc.c, src/base/ftoutln.c, src/gzip/ftgzip.c, src/psaux/psconv.c, src/truetype/ttgload.c, src/type1/t1gload.c: this is a major patch used to drastically improve the performance of loading glyphs. This both speeds up loading the glypn vector themselves and the auto-fitter. note that we've started using inline assembler with GCC to implement FT_MulFix, given that this function is so damn important for the engine's performance. the resulting speed-up is about 25%.
David Turner de271ab8 2006-02-25T14:53:02 * builds/unix/ftsystem.c, include/freetype/config/ftheader.h, include/freetype/internal/services/svotval.h, include/freetype/internal/services/svpfr.h, src/base/ftsystem.c, src/bdf/bdfdrivr.c, src/cache/ftcbasic.c, src/cff/cffcmap.c, src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/lzw/ftlzw2.c, src/psaux/t1cmap.c, src/sfnt/ttbdf.c, src/smooth/ftgrays.c: solved -Wmissing-prototypes warnings with GCC
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 !!
Werner Lemberg ebf5585d 2005-03-16T01:49:54 Formatting.
David Turner 68df4f73 2005-03-15T18:18:57 * src/bdf/bdflib.c: various improvements to the bdf loader, mainly used to reduce the amount of heap size required to only test wether we're dealing with a BDF font (the old code allocated 64 Kb right before any test). * src/lzw/ftlzw.c (FT_Stream_OpenLZW): modified the function to check the LZW header before doing anything else. This helps avoid un-necessary heap allocations (400 Kb of heap memory for the LZW decoder ! Oh my !) * src/gzip/ftgzip.c (FT_Stream_OpenGZip): ditto for the .gz decoder, though the code savings is smaller.
David Turner 5290d2fb 2004-06-23T15:44:03 performance optimizations regarding face opening
Werner Lemberg dfa46199 2004-03-05T09:26:24 * Jamfile, vms_make.com, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype/vcproj, include/freetype/ftmoderr.h: Add LZW module. * Jamfile.in: Removed. * docs/CHANGES: Updated. * include/freetype/internal/ftobjs.h: s/MIN/FT_MIN/, s/MAX/FT_MAX/, s/ABS/FT_ABS/. Updated all callers. * src/type1/t1load.c (parse_dict), src/pcf/pcfdrivr.c (PCF_Face_Init): Use FT_ERROR_BASE. Add support for PCF fonts compressed with LZW (extension .pcf.Z, created with `compress'). * include/freetype/config/ftoption.h, devel/ftoption.h (FT_CONFIG_OPTION_USE_LZW): New macro. * include/freetype/ftlzw.h: New file. * include/freetype/config/ftheader.h (FT_LZW_H): New macro for ftlzw.h. * src/lzw/*: New files. * src/pcf/pcfdrivr.c: Include FT_LZW_H. (PCF_Face_Init): Try LZW also. * src/gzip/ftgzip.c: s/0/Gzip_Err_Ok/ where appropriate. Beautify.
Werner Lemberg 779afe4b 2003-06-22T15:33:53 * src/winfonts/winfnt.c (FNT_Load_Glyph): Use first_char in computation of glyph_index. (FNT_Size_Set_Pixels): To find a strike, first check pixel_height only, then try to find a better hit by comparing pixel_width also. Without this fix it isn't possible to access all strikes. Also compute metrics.max_advance to be in sync with other bitmap drivers. * src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code. (FT_Set_Pixel_Size): Assign value to `metrics' after validation of arguments. Synchronize computation of height and width for bitmap strikes. The `width' field in the FT_Bitmap_Size structure is now only useful to enumerate different strikes. The `max_advance' field of the FT_Size_Metrics structure should be used to get the (maximum) width of a strike. * src/bdf/bdfdrivr.c (BDF_Face_Init): Don't use AVERAGE_WIDTH for computing `available_sizes->width' but make it always equal to `available_sizes->height'. * src/pcf/pcfread.c (pcf_load_font): Don't use RESOLUTION_X for computing `available_sizes->width' but make it always equal to `available_sizes->height'. * src/truetype/ttdriver.c (Set_Pixel_Sizes): Pass only single argument to function. * src/psnames/psmodule.c (ps_unicode_value): Handle `.' after `uniXXXX' and `uXXXX[X[X]]'. * src/bdf/bdfdrivr.c: s/FT_Err_/BDF_Err/. * src/cache/ftccache.c, src/cache/ftcsbits.c, src/cache/ftlru.c: s/FT_Err_/FTC_Err_/. * src/cff/cffcmap.c: s/FT_Err_/CFF_Err_/. * src/pcf/pcfdrivr.c: s/FT_Err_/PCF_Err_/. * src/psaux/t1cmap.c: Include psauxerr.h. s/FT_Err_/PSaux_Err_/. * src/pshinter/pshnterr.h: New file. * src/pshinter/rules.mk: Updated. * src/pshinter/pshalgo.c, src/pshinter/pshrec.c: Include pshnterr.h. s/FT_Err_/PSH_Err_/. * src/pfr/pfrdrivr.c, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c: s/FT_Err_/PFR_Err_/. * src/sfnt/sfdriver.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c, src/sfnt/ttload.c: s/FT_Err_/SFNT_Err_/. * src/truetype/ttgload.c: s/FT_Err_/TT_Err_/. * src/gzip/ftgzip.c: Load FT_MODULE_ERRORS_H and define FT_ERR_PREFIX and FT_ERR_BASE. s/FT_Err_/Gzip_Err_/.
Werner Lemberg a7d6b4da 2003-06-09T20:55:04 * src/gzip/ftgzip.c: (inflate_mask): Replaced with... (NO_INFLATE_MASK): This. * src/gzip/infutil.h: Declare `inflate_mask' conditionally by NO_INFLATE_MASK.
Werner Lemberg 0240d29c 2003-06-09T15:54:18 * src/gzip/ftgzip.c (ft_gzip_file_fill_output): Handle Z_STREAM_END correctly. * src/pshinter/pshglob.c (psh_globals_new): Change calculation of dim->stdw.count to avoid compiler problem. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Move the block variables to the beginning of the function to avoid compiler problems. Add casts necessary for 16bit compilers. * src/pfr/rules.mk (PFR_DRV_SRC): Add pfrsbit.c. (PFR_DRV_H): Add pfrtypes.h. * include/freetype/config/ftconfig.h: s/__MWKS__/__MWERKS__/. * src/pfr/pfrsbit.c (pfr_bitwriter_init): Change type of third argument to FT_Bool. (pfr_lookup_bitmap_data): Change type of third and fourth argument to FT_UInt. Updated caller. (pfr_load_bitmap_bits): Change type of fourth argument to FT_Bool.
Werner Lemberg 756655bd 2003-06-07T05:13:22 * src/base/ftmac.c (FT_New_Face_From_SFNT): s/rlen/sfnt_size/ to make it compile. * include/freetype/internal/psaux.h, src/truetype/ttgload.h: s/index/idx/ to fix compiler warnings. * src/sfnt/ttcmap0.c (tt_face_build_cmaps): Use more `volatile' to fix compiler warning. * src/gzip/ftgzip.c (BUILDFIXED): Removed. * src/gzip/inftrees.c (inflate_trees_fixed) [!BUILDFIXED]: Use FT_UNUSED to remove compiler warning.
Werner Lemberg f79a7ae0 2003-05-21T21:47:25 * src/gzip/ftgzip.c (ft_gzip_fil_io): Revert change from yesterday; it has already been fixed differently. * src/truetype/ttinterp.c (DO_SFVTL): Add missing braces around if-clause.
Werner Lemberg 77c34b82 2003-05-20T22:06:38 * t1load.c (parse_blend_axis_types): Fix compiler warning. * src/gzip/ftgzip.c (ft_gzip_file_io): Avoid zero value of `delta' to prevent infinite loop. * docs/VERSION.DLL: Provide better autoconf snippet to check FreeType version. * src/base/ftobjs.c (open_face): Free `internal' not `face->internal' in case of error to avoid possible segfault. * src/pshinter/pshalgo3.c (ps3_hints_apply): Check whether we actually have an outline.
Werner Lemberg 428c2e4f 2003-04-25T05:35:04 * src/bdf/bdflib.c (hash_bucket, hash_lookup): Use `const' for first argument. (bdf_get_font_property): Use `const' for third argument. Updated all callers. * src/bdf/bdfdrivr.c (BDF_Face_Init): Set pixel width and height similar to the PCF driver. * src/bdf/bdf.h (_hashnode): Use `const' for `key'. Updated. * src/gzip/ftgzip.c: C++ doesn't like that the array `inflate_mask' is declared twice. It is perhaps better to modify the zlip source files directly instead of this hack. (zcalloc, zfree, ft_gzip_stream_close, ft_gzip_stream_io): Add casts to make build with g++ successful.
Werner Lemberg 917a5937 2003-04-23T07:13:54 * src/gzip/ftgzip.c (zcalloc) [!FT_CONFIG_OPTION_SYSTEM_ZLIB]: Convert K&R format to modern C usage. (FT_Stream_OpenGzip): Use long constant. Cleanups.
David Turner a3c37802 2003-02-28T08:32:46 * src/gzip/ftgzip.c (ft_gzip_file_done): fixed memory leak, the ZLib stream was not properly finalized
David Turner 229d122e 2003-02-25T19:20:12 * src/gzip/ftgzip.c: fixed a bug that caused FreeType to loop endlessly when trying to read certain compressed gzip files. The following test could be used to reveal the bug: touch 0123456789 ; gzip 0123456789 ; ftdump 0123456789.gz * src/pfr/pfrobjs.c, src/pfr/pfrload.c, src/pfr/pfrtypes.h: several fixes to the PFR font driver: - the list of available embedded bitmaps was not correctly set in the root FT_FaceRec structure describing the face - the glyph loader always tried to load the outlines when FT_LOAD_SBITS_ONLY was specified - the table loaded now scans for *undocumented* elements of a physical font's auxiliary data record, this is necessary to retrieve the "real" family and style names. NOTE THAT THIS CHANGES THE FAMILY NAME OF MANY PFR FONTS !!
David Turner 4bdf4350 2003-01-30T23:24:18 various improvements for 2.1.4. see ChangeLog, I've got problems with copy & paste on my desktop !!
David Turner 619d62d9 2003-01-15T23:01:02 * src/gzip/ftgzip.c: bugfix: couldn't read certain gzip-ed font files
David Turner 621e4886 2002-12-16T21:51:24 2002-12-16 David Turner <david@freetype.org> * docs/VERSION.DLL: updating document to better explain the differences between the three version numbers being used on Unix, as well as provide the AutoConf fragment provided by Lars Clausen * src/smooth/ftgrays.c (gray_render_conic): fixed small bug that prevented bezier arcs with negative vertical coordinates to be rendered appropriately 2002-11-27 Vincent Caron <v.caron@zerodeux.net> * builds/unix/unix-def.in, builds/unix/freetype-config.in, builds/unix/configure.ac, src/gzip/rules.mk, src/gzip/ftgzip.c: adding support for system zlib installations when available on the target platform (Unix only)
David Turner 60b32e16 2002-11-06T22:32:54 2002-11-05 David Turner <david@freetype.org> * include/freetype/config/ftoption.h, src/gzip/ftgzip.c: added support for the FT_CONFIG_OPTION_SYSTEM_ZLIB option, used to specify the use of system-wide zlib. Note that this macro, as well as FT_CONFIG_OPTION_BYTECODE_INTERPRETER, is not #undef-ed anymore. This allows the build system to define them depending on the configuration (typically by adding -D flags at compile time). * src/sfnt/ttcmap0.c (tt_face_build_cmaps): removed compiler warnings in optimized mode relative to the "volatile" local variables. This was not a compiler bug after all, but the fact that a pointer to a volatile variable is not the same than a volatile pointer to a variable :-) the fix was to change "volatile FT_Byte* p" into "FT_Byte* volatile p" * src/pfr/pfrload.c, src/pfr/pfrdrivr.c, src/gzip/inftrees.c: removed compiler warnings in optimized modes * src/gzip/*.[hc]: modified our ZLib copy in order to prevent exporting any zlib function names outside of the component. This prevents linking problems on some platforms, when applications want to link FreeType _and_ ZLib together. 2002-11-05 Juliusz <jch@pps.jussieu.fr> * src/psaux/psobjs.c (ps_table_add): modified increment loop in order to implement exponential behaviour
David Turner 54b0bca5 2002-10-31T22:19:27 * include/freetype/ftgzip.h, src/gzip/ftgzip.c: adding support for gzip compressed streams !! * src/pcf/pcfdriver.c: adding automatic support for gzip-compressed PCF files