src/cache/ftlru.c


Log

Author Commit Date CI Message
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 88c0478d 2003-06-12T13:14:15 * include/freetype/internal/psaux.h (T1_FieldType): Add T1_FIELD_TYPE_KEY. (T1_FIELD_KEY): New macro. * src/psaux/psobjs.c (ps_parser_load_field): Handle T1_FIELD_TYPE_KEY. * src/cid/cidtoken.h: Use T1_FIELD_KEY for /CIDFontName. * src/cache/ftlru.c (FT_LruList_Remove_Selection): Decrease number of nodes. (FT_LruList_Lookup): Fix assertion for out-of-memory case.
Werner Lemberg 319c00d7 2003-04-23T19:48:24 Fixing bugs reported by Nelson Beebe. * src/base/ftstroker.c (FT_Stroker_ParseOutline): Remove unused variable `in_path'. * src/base/ftobjs (ft_glyphslot_set_bitmap): Change type of second argument to `FT_Byte*'. * include/freetype/internal/ftobjs.h: Updated. * src/bdf/bdflib.c (_bdf_readstream): Remove unused variable `res'. (_bdf_parse_glyphs): Remove unused variable `next'. Mark `call_data' as unused. * src/cache/ftlru.c (FT_LruList_Lookup): Remove unused variable `plast'. * src/pcf/pcfread.c (pcf_seek_to_table_type): Slight recoding to actually use `error'. (pcf_load_font): Remove unused variable `avgw'. * src/pfr/pfrobjs.c (pfr_face_get_kerning): Change return type to `void'. Mark `error' as unused. * src/pfr/pfrobjs.h: Updated. * src/pfr/pfrdrivr.c (pfr_get_kerning): Updated. * src/sfnt/ttload.c (sfnt_dir_check): Remove unused variable `format_tag'. * src/sfnt/ttcmap0.c (tt_cmap6_validate, tt_cmap10_validate): Remove unused variable `start'. (tt_cmap10_char_next): Remove unused variable `result' * src/sfnt/sfobjs.c (tt_face_get_name): Mark `error' as unused. * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Mark `error' as unused. * src/type1/t1objs.c (T1_Face_Init): Remove unused variable `pshinter'. * src/type1/t1gload.c (T1_Load_Glyph): Use `glyph_data_loaded' only for FT_CONFIG_OPTION_INCREMENTAL.
Werner Lemberg 2acb963b 2003-04-23T06:47:12 Cleanups.
David Turner 66cbc209 2003-03-20T07:04:40 * docs/*: serious rewriting of the documentation * include/freetype/internal/ftobjs.h, src/base/ftobjs.c, src/bdf/bdfdrivr.c, src/pcf/pcfdriver.c, src/pfr/pfrsbit.c, src/sfnt/ttsbit.c, src/type42/t42objs.c, src/winfonts/winfnt.c: introduced three new functions to deal with glyph bitmaps within FT_GlyphSlot objects. these are: ft_glyphslot_free_bitmap ft_glyphslot_alloc_bitmap ft_glyphslot_set_bitmap these are much more convenient to use than managing the FT_GLYPH_OWN_BITMAP flag manually. the font drivers have been modified to use them as well. * src/cache/ftlru.c: fixed an invalid assertion check
David Turner b280537b 2003-03-13T21:07:51 * src/base/ftdbgmem.c, docs/DEBUG.TXT: added new environment variables to control memory debugging with FreeType. See the description of "FT2_DEBUG_MEMORY", "FT2_ALLOC_TOTAL_MAX" and "FT2_ALLOC_COUNT_MAX" in DEBUG.TXT * src/cache/ftccache.c, src/cache/ftccmap.c, src/cache/ftcsbits.c, ftlru.c: fixed the cache sub-system to correctly deal with out-of-memory conditions. * src/pfr/pfrobjs.c, src/pfr/pfrsbits.c: fixing compiler warnings and a small memory leak * src/psaux/psobjs.c (t1_reallocate_table): fixed a bug (memory leak) that only happened when trying to resize an array would end in an OOM. * src/smooth/ftgrays.c: removed compiler warnings / volatile bug * src/truetype/ttobjs.c: removed segmentation fault that happened in tight memory environments.
Werner Lemberg 48c984b5 2002-03-30T16:41:09 * src/cff/cffdrivr.c (cff_get_glyph_name): Fix debug message. * src/cff/cffobjs.c (CFF_Driver_Init, CFF_Driver_Done) [TT_CONFIG_OPTION_EXTEND_ENGINE]: Removed. * src/cff/sfobjs.c (SFNT_Load_Face) [TT_CONFIG_OPTION_EXTEND_ENGINE]: Ditto. * src/truetype/ttobjs.c (TT_Init_Driver, TT_Done_Driver) [TT_CONFIG_OPTION_EXTEND_ENGINE]: Ditto. * src/truetype/ttdriver.c, src/truetype/ttobjs.c, src/truetype/ttobjs.h: Renaming driver functions to the FT_<Subject>_<Action> scheme: TT_Init_Driver => TT_Driver_Init TT_Done_Driver => TT_Driver_Done TT_Init_Face => TT_Face_Init TT_Done_Face => TT_Face_Done TT_Init_Size => TT_Size_Init TT_Done_Size => TT_Size_Done TT_Reset_Size => TT_Size_Reset
David Turner e459d742 2002-03-22T13:52:37 * include/freetype/internal/ftmemory.h, and a lot of other files !!: changed the names of memory macros. Examples: MEM_Set => FT_MEM_SET MEM_Copy => FT_MEM_COPY MEM_Move => FT_MEM_MOVE ALLOC => FT_ALLOC FREE => FT_FREE REALLOC = >FT_REALLOC FT_NEW was introduced to allocate a new object from a _typed_ pointer.. note that ALLOC_ARRAY and REALLOC_ARRAY have been replaced by FT_NEW_ARRAY and FT_RENEW_ARRAY which take _typed_ pointer arguments. This results in _lots_ of sources being changed, but makes the code more generic and less error-prone..
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 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 :-)
David Turner 5b1e8141 2001-10-07T11:06:07 * src/cache/ftlru.c (FT_Lru_Lookup_Node): fixed a bug that prevented correct LRU behaviour
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.
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 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 50840943 2000-12-06T18:02:01 * src/cache/ftlru.c (FT_Lru_Done): fixed a small memory leak
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 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 ebdce834 2000-09-19T01:11:11 updated the cache sub-system. Major internal rewrite please be aware that major bug persist..
Werner Lemberg d1b7475b 2000-08-24T16:29:15 Formatting, small fixes. Adding basic input parameter checking for exported functions.
David Turner 35db7322 2000-08-24T12:39:40 - fixed an horrible FT_LOAD_RENDER bug that returned empty bitmaps !! - tested and fixed the image cache object. I'm performing a few more checks though, and we'll call the cache sub-system completed !!
David Turner 98d2701c 2000-08-24T11:53:35 changed the FTC_Manager_New function to accept "max_faces" and "max_sizes" parameters fixed some bugs. the cache manager is now tested and validated (now, it's time for the glyph image cache)
David Turner 3b2c50eb 2000-08-23T21:11:13 completing the FreeType Cache subsystem files
Werner Lemberg 8728f294 2000-08-23T17:32:42 Formatting, small fixes. Adding copyright notices etc.
David Turner b466a765 2000-08-23T11:22:30 The FreeType Caching Subsystem - first lines of code beware, this code is not tested, and probably doesn't compile correctly.. more information will follow..