src/cache/ftcglyph.c


Log

Author Commit Date CI Message
David Turner 5ab41363 2004-07-18T07:15:18 * include/freetype/cache/ftcglyph.h, src/cache/ftcglyph.c: fixed a dangling pointer bug that happened in very rare cases: i.e. when a new family object was destroyed by an out-of-memory condition during a glyph node initialization. The function FTC_Cache_Lookup would flush the cache and restart the lookup with a bad pointer. * src/cache/ftcmanag.c: fixed a cache flushing bug
Werner Lemberg fefd8742 2004-06-12T13:21:20 * docs/CHANGES: Updated. Minor clean-ups.
David Turner 7246d9d3 2004-06-10T20:09:05 removing compiler warning
David Turner b83239b7 2004-06-09T21:07:49 * include/freetype/cache/ftcmru.h, src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftcglyph.c, src/cache/ftcmanag.c, src/cache/ftcsbits.c: fixing some annoying bugs and inefficiencies in the cache sub-system.
Werner Lemberg e260d253 2004-05-17T09:25:04 * src/cache/ftcbasic.c (ftc_basic_family_compare, ftc_basic_family_init, ftc_basic_family_get_count, ftc_basic_family_load_bitmap, ftc_basic_family_load_glyph, ftc_basic_gnode_compare_faceid): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. (ftc_basic_image_family_class, ftc_basic_image_cache_class, ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class): Remove casts. * src/cache/ftccback.h: Adjust parameters and return types to prototypes given in header files from include/freetype/cache. * src/cache/ftcimage.c (ftc_inode_free, ftc_inode_new, ftc_inode_weight): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. * src/cache/ftcsbits.c (ftc_snode_free, ftc_snode_new, ftc_snode_weight, ftc_snode_compare): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. * src/cache/ftccmap.c (ftc_cmap_node_free, ftc_cmap_node_new, ftc_cmap_node_weight, ftc_cmap_node_compare, ftc_cmap_node_remove_faceid): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. (ftc_cmap_cache_class): Remove casts. * src/cache/ftcglyph.c (ftc_gnode_compare, ftc_gcache_init, ftc_gcache_done): Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. * src/cache/ftcmanag.c (ftc_size_node_done, ftc_size_node_compare, ftc_size_node_init, ftc_size_node_reset, ftc_size_node_compare_faceid, ftc_face_node_init, ftc_face_node_done, ftc_face_node_compare: Adjust parameters and return types to prototypes given in header files from include/freetype/cache. Use casts to proper types locally. (ftc_size_list_class, ftc_face_list_class): Remove casts. * src/autohint/ahmodule.c (ft_autohinter_init, ft_autohinter_done): Use FT_Module as parameter and do a cast to FT_AutoHinter locally. (autohint_module_class): Remove casts. * src/base/ftglyph.c (ft_bitmap_glyph_init, ft_bitmap_glyph_copy, ft_bitmap_glyph_done, ft_bitmap_glyph_bbox, ft_outline_glyph_init, ft_outline_glyph_done, ft_outline_glyph_copy, ft_outline_glyph_transform, ft_outline_glyph_bbox, ft_outline_glyph_prepare): Use FT_Glyph as parameter and do a cast to FT_XXXGlyph locally. Use FT_CALLBACK_DEF throughout. (ft_bitmap_glyph_class, ft_outline_glyph_class): Remove casts. * src/bdf/bdfdrivr.c (bdf_cmap_init, bdf_cmap_done, bdf_cmap_char_index, bdf_cmap_char_next): Use FT_CMap as parameter and do a cast to BDF_CMap locally. (bdf_cmap_class): Remove casts.
Werner Lemberg 09370c8c 2004-02-17T18:41:58 Fix callback functions in cache module. * src/cache/ftccback.h: New file for callback declarations. * src/cache/ftcbasic.c (ftc_basic_family_compare, ftc_basic_family_init, ftc_basic_family_get_count, ftc_basic_family_load_bitmap, ftc_basic_family_load_glyph, ftc_basic_gnode_compare_faceid): Use FT_CALLBACK_DEF. (ftc_basic_image_family_class, ftc_basic_image_cache_class, ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class): Use FT_CALLBACK_TABLE_DEF and local wrapper functions. * src/cache/ftccache.c: Include ftccback.h. (ftc_cache_init, ftc_cache_done): New wrapper functions which use FT_LOCAL_DEF. * src/cache/ftccmap.c: Include ftccback.h. (ftc_cmap_cache_class): Use local wrapper functions. * src/cache/ftcglyph.c: Include ftccback.h. (ftc_gnode_compare, ftc_gcache_init, ftc_gcache_done): New wrapper functions which use FT_LOCAL_DEF. * src/cache/ftcimage.c: Include ftccback.h. (ftc_inode_free, ftc_inode_new, ftc_inode_weight): New wrapper functions which use FT_LOCAL_DEF. * src/cache/ftcmanag.c (ftc_size_list_class, ftc_face_list_class): Use FT_CALLBACK_TABLE_DEF. * src/cache;/ftcsbits.c: Include ftccback.h. (ftc_snode_free, ftc_snode_new, ftc_snode_weight, ftc_snode_compare): New wrapper functions which use FT_LOCAL_DEF. * src/cache/rules.mk (CACHE_DRV_H): Add ftccback.h.
Werner Lemberg 80cfbd70 2003-12-26T07:26:08 * src/base/fttrigon.c, src/base/ftgloadr.c: Inlude FT_INTERNAL_OBJECTS_H. * src/base/ftstroke.c (FT_Outline_GetInsideBorder, FT_Outline_GetOutsideBorder): s/or/o/ to make it compile with C++ compilers. * src/cache/ftcmru.c, include/freetype/cache/ftcmru.h: s/select/selection/ to avoid compiler warning. * src/cff/cffload.h: s/select/ftselect/ to avoid potential compiler warning. Formatting.
Werner Lemberg 328abf30 2003-12-24T13:37:58 * src/cff/cffgload.c (cff_lookup_glyph_by_stdcharcode): Handle CID-keyed fonts. Remove MS-DOS line endings. Minor formatting issues.
David Turner 02361222 2003-12-23T23:54:00 * include/freetype/cache/ftccache.h, include/freetype/cache/ftcmru.h, include/freetype/cache/ftcglyph.h, src/cache/ftcbasic.c, src/cache/ftccache.c, src/cache/ftccmap.c, src/cache/ftcmanag.c: additional speed optimization to the cache sub-system. It is now up to 70% faster than the one in the previous table release (i.e. 2.1.7). Note that the API did slightly change though.
David Turner 581ec91c 2003-12-22T21:53:37 * include/freetype/ftcache.h, include/freetype/cache/ftcmanag.h, include/freetype/cache/ftccache.h, include/freetype/cache/ftcmanag.h, include/freetype/cache/ftcmru.h (added), include/freetype/cache/ftlru.h (removed), include/freetype/cache/ftcsbits.h, include/freetype/cache/ftcimage.h, include/freetype/cache/ftcglyph.h, src/cache/ftcmru.c, src/cache/ftcmanag.c, src/cache/ftccache.c, src/cache/ftcglyph.c, src/cache/ftcimage.c, src/cache/ftcsbits.c, src/cache/ftccmap.c, src/cache/ftcbasic.c (added), src/cache/ftclru.c (removed): *Complete* rewrite of the cache sub-system to "solve" the following points: - all public APIs have been moved to FT_CACHE_H, everything under "include/freetype/cache" is only needed by client applications that want to implement their own caches - a new function named FTC_Manager_RemoveFaceID to deal with the uninstallation of FaceIDs - the image and sbit cache are now abstract classes, that can be extended much more easily by client applications - better performance in certain areas. Further optimizations to come shortly anyway... - the FTC_CMapCache_Lookup function has changed its signature, charmaps can now only be retrieved by index - FTC_Manager_Lookup_Face => FTC_Manager_LookupFace FTC_Manager_Lookup_Size => FTC_Manager_LookupSize (still in private header for the moment)
David Turner 89f331b7 2003-12-21T01:41:32 important bug fixes for new cache code
David Turner 57ecae22 2003-12-19T21:23:58 new version of the cache sub-system - still under debugging
Werner Lemberg 21e046e0 2001-12-20T17:49:10 Formatting. * src/cache/ftccache.c (ftc_node_destroy, ftc_cache_lookup): Fix tracing strings. * src/cache/ftccmap.c (ftc_cmap_family_init): Ditto. * src/cache/ftcmanag.c (ftc_family_table_alloc, ftc_family_table_free, FTC_Manager_Check): Ditto. * src/cache/ftcsbits.c (ftc_sbit_node_load): Ditto.
David Turner 145f94cb 2001-12-07T14:43:45 added new charmap cache. see include/freetype/cache/ftccmap.h
David Turner 14183ea0 2001-12-05T15:59:33 First of all, a big thanks to Werner and Antoine for their latest work !! * src/pshinter/pshalgo2.c (psh2_hint_table_init), src/pshinter/pshalgo1.c (psh1_hint_table_init): removed compiler warnings * include/freetype/cache/*, src/cache/*: yet another massive rewrite of the caching sub-system, in order to both increase performance and allow simpler cache sub-classing. As an example, the code for the image and sbit caches is now much simpler I still need to update the documentation in www/freetype2/docs/cache.html to reflect the new design though..
Werner Lemberg c3b21608 2001-12-05T01:22:05 Formatting. Cleaning up of ChangeLog. * docs/license.txt: s/X Windows/X Window System/. * src/raster/ftraster.c: Fix definition condition of MEM_Set(). * src/smooth/ftgrays.c (M_Y): Change value to 192. * src/base/ftdbgmem.c (ft_mem_table_destroy): Fix printf() parameter. Remove unused variable. * src/cache/ftcimage.c (ftc_image_node_init, ftc_image_node_compare): Remove unused variables. * src/cache/ftcsbits.c (ftc_sbit_node_weight): Remove unused variable. * src/raster/ftraster.c (MEM_Set): Move definition down to avoid compiler warning. * src/autohint/ahhint.c (ah_hinter_hint_edges): Use UNUSED() to avoid compiler warnings. * src/pcf/pcfread.c (tableNames): Use `const'. (pcf_read_TOC): Change counter name to avoid compiler warning. Use `const'. * src/pshinter/pshrec.c (ps_hints_close): Remove redundant declaration. * src/pshinter/pshalgo1.c (psh1_hint_table_init): Rename variables to avoid shadowing. * src/pshinter/pshalgo2.c (psh2_hint_table_activate_mask): Ditto. * src/type1/t1objs.h: Remove double declarations of `T1_Size_Init()' and `T1_Size_Done()'.
David Turner cd605b63 2001-10-26T16:58:27 _major_ re-design of the caching sub-system. Still using the same API though :-)
Werner Lemberg 415235df 2001-06-28T17:49:10 finishing function header formatting updating copyrights
Werner Lemberg f814d0fa 2001-06-27T16:18:10 First round in converting type foo ( ... ) to type foo ( ... ) Other minor formatting issues.
David Turner dee78134 2001-06-27T09:26:46 * include/freetype/ftconfig.h, src/*/*.c: changed the definition and uses of the FT_CALLBACK_DEF macro in order to support 16-bit compilers
Werner Lemberg 1f7f0e87 2001-06-06T17:30:41 Complete redesign of error codes. Please check ftmoderr.h for more details. * include/freetype/internal/cfferrs.h, include/freetype/internal/tterrors.h, include/freetype/internal/t1errors.h: Removed. Replaced with files local to the module. All extra error codes have been moved to `fterrors.h'. * src/sfnt/ttpost.h: Move error codes to `fterrors.h'. * src/autohint/aherrors.h, src/cache/ftcerror.h, src/cff/cfferrs.h, src/cid/ciderrs.h, src/pcf/pcferror.h, src/psaux/psauxerr.h, src/psnames/psnamerr.h, src/raster/rasterrs.h, src/sfnt/sferrors.h, src/smooth/ftsmerrs.h, src/truetype/tterrors.h, src/type1/t1errors.h, src/winfonts/fnterrs.h: New files defining the error names for the module it belongs to. * include/freetype/ftmoderr.h: New file, defining the module error offsets. Its structure is similar to `fterrors.h'. * include/freetype/fterrors.h (FT_NOERRORDEF): New macro. (FT_ERRORDEF): Redefined to use module error offsets. All internal error codes are now public; unused error codes have been removed, some are new. * include/freetype/config/ftheader.h (FT_MODULE_ERRORS_H): New macro. * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_MODULE_ERRORS): New macro. All other source files have been updated to use the new error codes; some already existing (internal) error codes local to a module have been renamed to give them the same name as in the base module. All make files have been updated to include the local error files. * src/cid/cidtokens.h: Replaced with... * src/cid/cidtoken.h: This file for 8+3 consistency. * src/raster/ftraster.c: Use macros for header file names.
Werner Lemberg 914b289f 2001-03-10T17:07:42 * src/*/*.c: Added many casts to make code more 64bit-safe.
Werner Lemberg cc069beb 2000-12-08T16:17:16 cleanups
David Turner 19ed8afe 2000-12-08T02:42:29 - updated all source files to adhere to the new inclusion scheme - the CFF loader now loads the encodings and charset tables though doesn't use them for now
David Turner efa80f2b 2000-12-01T21:43:05 fixed a few warnings with Borland C++
Werner Lemberg a82cd844 2000-11-10T22:43:37 Small fixes and formatting.
David Turner 23a0670b 2000-11-08T00:20:25 removed the file <freetype/internal/ftlist.h> and corrected files that depended on it. the ftlist.c function definitions are now FT_EXPORT_DEF instead of FT_BASE_DEF
Werner Lemberg 4b68007b 2000-11-07T06:30:29 Complementing David's changes with formatting, adding documentation, etc. More `*'-convention formatting, adding the `a' resp. `an' prefix to variables.
David Turner 25dee217 2000-11-06T19:29:06 some updates to the cache sub-system. some methods were moved from the concrete "FTC_Image_Cache" and "FTC_SBit_Cache" to the abstract "FTC_Glyph_Cache" and "FTC_Chunk_Cache", respectively.. note: this is not the end of changes to the cache sub-system
Werner Lemberg dc72aff4 2000-11-04T08:33:38 Finishing David's latest changes (there were some errors in it).
David Turner 76a5f623 2000-11-04T01:55:49 major reformatting of the sources: FT_EXPORT_DEF => FT_EXPORT FT_EXPORT_FUNC => FT_EXPORT_DEF BASE_DEF => FT_BASE BASE_FUNC => FT_BASE_DEF LOCAL_DEF => FT_LOCAL LOCAL_FUNC => FT_LOCAL_DEF LOCAL_FUNC_X => FT_CALLBACK_DEF LOCAL_DEF_X => FT_CALLBACK_TABLE FT_CPLUSPLUS => FT_CALLBACK_TABLE_DEF
Werner Lemberg ab855232 2000-10-31T22:13:54 Fixing include header for a `make multi' build. Finishing formatting of cache stuff. Fixed getDriverClass stuff -- added it to winfnt.c also. Note that this still has to be documented.
Werner Lemberg e4b32a5d 2000-10-31T20:42:18 Removing trailing whitespace.
David Turner ece63798 2000-10-28T23:34:45 completed the sbit cache, though it's still buggy :-( major reformatting of the cache subsystem (again) added substantial documentation too in header files
David Turner 4e4a4363 2000-10-28T13:17:11 - completed the abstract chunk cache class - started implementin a "small-bitmaps" cache derived from it - (soon a "metrics" cache will be written too)
David Turner 9b8f5c4c 2000-10-28T07:26:59 small updates: - reworked slightly the cache manager to better differentiate between the abstract class in "ftcglyph.h" and the FT_Glyph sub-class in "ftcimage.h", and slightly reduced the size of FTC_GlyphNodeRec, saving 8 bytes on a 32-bit system. Yes, I'm crazy ;-) - added build files to compile with LCC on Unix too (compile speeds _are_ insane with it). There is unfortunately a bug in the version I'm using (LCC 4.1) that prevents it to compile FT_MulTo64 correctly (in src/base/ftcalc.c) the generated assembly is incorrect, I don't know what to do ?? the build files are ok, though.. you should invoke "make setup lcc" to select them..
Werner Lemberg eddd9909 2000-10-12T05:05:40 formatting small fixes
David Turner ebdce834 2000-09-19T01:11:11 updated the cache sub-system. Major internal rewrite please be aware that major bug persist..