src


Log

Author Commit Date CI Message
Werner Lemberg f3c57917 2011-03-26T09:03:32 Copyright.
Werner Lemberg 360646c9 2011-03-24T09:29:23 * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 256. This limit is given on p. 37 of Adobe Tech Note #5014.
Werner Lemberg 01caf4a7 2011-03-23T05:19:59 * src/truetype/ttpload.c(tt_face_load_loca): Fix mismatch warning.
Werner Lemberg 6e3fee0b 2011-03-21T09:28:52 Typo.
Werner Lemberg af7b8b1a 2011-03-20T07:51:57 * src/sfnt/sfobjs.c (sfnt_open_font): Check number of TTC subfonts.
Werner Lemberg 8bd77f90 2011-03-19T15:27:04 More C++ compilation fixes. * src/autofit/afhints.c (af_glyph_hints_dump_points, af_glyph_hints_dump_segments, af_glyph_hints_dump_edges) [__cplusplus]: Protect with `extern "C"'.
Werner Lemberg c7f26a19 2011-03-19T02:28:21 C++ compilation fixes. * src/autofit/aflatin.c (af_latin_hints_apply), src/autofit/afcjk.c (af_cjk_hints_apply): Use cast for `dim'.
Alexei Podtelezhnikov 8fb88414 2011-03-17T20:24:57 A better fix for Savannah bug #32671. * src/smooth/ftgrays.c (gray_render_conic): Clean up code and replace WHILE loop with a more natural DO-WHILE construct.
Werner Lemberg 437fb8eb 2011-03-16T08:54:02 * src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field. Suggested by Graham Asher.
Werner Lemberg cecd9127 2011-03-09T06:18:28 Make FT_Sfnt_Table_Info return the number of SFNT tables. * src/sfnt/sfdriver.c (sfnt_table_info): Implement it. * include/freetype/tttables.h: Update documentation. * docs/CHANGES: Updated.
Bram Tassyns 3fd158d0 2011-03-07T09:33:53 Fix Savannah bug #27988. * src/cff/cffobjs.c (remove_style): New function. (cff_face_init): Use it to strip off the style part of the family name.
Werner Lemberg 6c045535 2011-03-07T05:40:42 Quick fix for Savannah bug #32671. This isn't the optimal solution yet, but it restores the previous rendering quality (more or less). * src/smooth/ftgrays.c (gray_render_conic): Do more splitting.
Werner Lemberg c9bdfa7e 2011-03-06T18:35:37 Fix autohinting fallback. * src/base/ftobjs.c (FT_Load_Glyph): Assure that we only check TTFs, ignoring CFF-based OTFs.
Werner Lemberg 4d0586f0 2011-03-06T18:22:08 Whitespace.
Werner Lemberg 576fc2c0 2011-03-02T03:52:36 Add AF_CONFIG_OPTION_USE_WARPER to control the autofit warper. * devel/ftoption.h, include/freetype/config/ftoption.h (AF_CONFIG_OPTION_USE_WARPER): New macro. * src/autofit/aftypes.h (AF_USE_WARPER): Remove. * src/autofit/*: s/AF_USE_WARPER/AF_CONFIG_OPTION_USE_WARPER/. * src/autofit/afwarp.c [!AF_CONFIG_OPTION_USE_WARPER]: Replace dummy variable assignment with a typedef.
Werner Lemberg e547a656 2011-02-26T18:39:10 [autofit] More comments, formatting, whitespace.
Werner Lemberg b7fc0c74 2011-02-26T18:36:21 [autofit] Slight simplifications. * src/autofit/aflatin.c (af_latin_hints_link_segments): Remove test which always returns false. (af_latin_hints_compute_blue_edges): Remove redundant assignment.
Werner Lemberg 6cfbb23c 2011-02-26T17:32:38 [autofit] Some comments. Whitespace.
Werner Lemberg 6c286896 2011-02-24T05:52:14 [autofit] Comment out unused code. * src/autofit/aflatin.c, src/autofit/aflatin2.c (af_latin_hints_compute_edges): Do it.
Werner Lemberg f42cc539 2011-02-24T05:18:46 * src/autofit/afhints.h (AF_GlyphHints): Remove unused field.
Werner Lemberg 6af02423 2011-02-22T10:29:30 [autofit] Add ASCII drawing for better explanation.
suzuki toshiya ae6d1d7b 2011-02-20T19:13:25 [cache] Fix an off-by-one bug in FTC_Manager_RemoveFaceID(). Found by <ychen1392001@yahoo.com.cn>, see detail in http://lists.gnu.org/archive/html/freetype/2011-01/msg00023.html * src/cache/ftccache.c (FTC_Cache_RemoveFaceID): Check the node buckets[cache->p + cache->mask] too.
Werner Lemberg 7ad15d59 2011-02-20T07:30:46 [autofit] Document warper.
Kevin Kofler ff809507 2011-02-19T23:09:26 Fall back to autohinting if a TTF/OTF doesn't contain any bytecode. This is Savannah patch #7471. * src/base/ftobjs.c (FT_Load_Glyph): Implement it.
John Tytgat 18fffa45 2011-02-19T07:11:17 [cff] Fix subset prefix removal. * src/cff/cffobjs.c (remove_subset_prefix): Update length after subset prefix removal.
Werner Lemberg c5bda503 2011-02-16T21:59:44 [autofit] Add a lot of comments and do some minor formatting.
Werner Lemberg 713faece 2011-02-03T19:47:13 * src/autofit/afdummy.c: Include `aferrors.h'. Problem reported by Chris Liddel <chris.liddell@artifex.com>.
Werner Lemberg 75df7060 2011-02-01T07:36:27 [cff] Ignore unknown operators in charstrings. Patch suggested by Miles.Lau <sunliang_liu@foxitsoftware.com>. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Emit tracing message for unknown operators and continue instead of exiting with a syntax error.
Werner Lemberg 18931a5a 2011-02-01T07:08:43 [truetype] FT_LOAD_PEDANTIC now affects `prep' and `fpgm' also. * src/truetype/ttgload.c (tt_loader_init): Handle `FT_LOAD_PEDANTIC'. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep, tt_size_init_bytecode, tt_size_ready_bytecode): New argument to handle pedantic mode. * src/truetype/ttobjs.h: Updated.
Werner Lemberg f1a981b5 2011-01-31T22:26:53 [truetype] Protect jump instructions against endless loops. * src/truetype/interp.c (DO_JROT, DO_JMPR, DO_JROF): Exit with error if offset is zero.
Werner Lemberg d6a213f8 2011-01-31T18:51:07 [truetype] Improve handling of invalid references. * src/truetype/interp.c: Set even more TT_Err_Invalid_Reference error codes only if pedantic hinting is active. At the same time, try to provide sane values which hopefully allow useful continuation. Exception to this is CALL and LOOPCALL – due to possible stack corruption it is necessary to bail out.
Werner Lemberg 96f04564 2011-01-31T10:24:32 [truetype] Improve handling of stack underflow. * src/truetype/ttinterp.c (TT_RunIns, Ins_FLIPPT, Ins_DELTAP, Ins_DELTAC): Exit with error only if `pedantic_hinting' is set. Otherwise, try to do something sane.
Werner Lemberg 91a97164 2011-01-30T20:12:54 Whitespace.
Werner Lemberg 0682251e 2011-01-30T16:38:09 * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message.
LIU Sun-Liang c61b3596 2011-01-30T16:29:45 [truetype]: Fix behaviour of MIAP for invalid arguments. * src/truetype/ttinterp.c (Ins_MIAP): Set reference points even in case of error.
Werner Lemberg 332da87d 2011-01-23T12:42:23 [autofit] Some formatting and clean-ups.
Werner Lemberg dcdb3167 2011-01-18T07:35:26 [truetype] Fix handling of MIRP instruction. Thanks to Greg Hitchcock who explained the issue. * src/truetype/ttinterp.c (Ins_MIRP): Replace a `>=' operator with `>' since the description in the specification is incorrect. This fixes, for example, glyph `two' in font `Helvetica Neue LT Com 65 medium' at 15ppem.
Werner Lemberg 21bdca79 2011-01-15T09:46:13 [raster] Make bbox handling the same as with Microsoft's rasterizer. Right before B/W rasterizing, the bbox gets simply rounded to integers. This fixes, for example, glyph `three' in font `Helvetica Neue LT Com 65 Medium' at 11ppem. Thanks to Greg Hitchcock who explained this behaviour. * src/raster/ftrend1.c (ft_raster1_render): Implement it.
Werner Lemberg 0039d012 2011-01-14T19:44:29 [raster] Add undocumented drop-out rule to the other bbox side also. * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Implement it.
Werner Lemberg c02485cb 2011-01-13T21:55:08 [raster] Reduce jitter value. This catches a rendering problem with glyph `x' from Tahoma at 10ppem. It seems that the increase of the precision in the change from 2009-06-11 makes a larger jitter value unnecessary. * src/raster/ftraster.c (Set_High_Precision): Implement it.
Werner Lemberg 29bc3105 2011-01-13T12:22:55 [raster] Handle drop-outs at glyph borders according to Microsoft. If a drop-out rule would switch on a pixel outside of the glyph's bounding box, use the right (or top) pixel instead. This is an undocumented feature, but some fonts like `Helvetica Neue LT Com 65 Medium' heavily rely on it. Thanks to Greg Hitchcock who explained this behaviour. * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop): Implement it.
Werner Lemberg 3757b1e1 2011-01-13T10:33:04 Cleanup/formatting.
suzuki toshiya 5e7ad208 2011-01-09T23:09:36 [cache] Fix Savannah bug #31923, patch drafted by Harsha. When a node comparator changes the cached nodes during the search of a node matching with queried properties, the pointers obtained before the functon should be updated to prevent the dereference to freed or reallocated nodes. To minimize the rescan of the linked list, the update is executed when the comparator notifies the change of cached nodes. This change depends previous change: 38b272ffbbdaae276d636aec4ef84af407d16181 * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Rescan the top node if the cached nodes are changed. * src/cache/ftccache.c (FTC_Cache_Lookup): Ditto.
suzuki toshiya 38b272ff 2011-01-09T22:49:07 [cache] Notice if a cache query induced the node list change. Some node comparators (comparing the cache node content and the properties specified by the query) can flush the cache node to prevent the cache inflation. The change may invalidate the pointers to the node obtained before the node comparison, so the change should be noticed to the caller. The problem caused by the cache node changing is reported by Harsha, see Savannah bug #31923. * src/cache/ftccache.h (FTC_Node_CompareFunc): Add new argument `FT_Bool* list_changed' to indicate the change of the cached nodes to the caller. (FTC_CACHE_LOOKUP_CMP): Watch the change of the cached nodes by `_list_changed'. (FTC_CACHE_TRYLOOP_END): Take new macro argument `_list_changed' and update it when FTC_Manager_FlushN() flushes any nodes. * src/cache/ftccback.h (ftc_snode_compare): Updated to fit with new FTC_Node_CompareFunc type. (ftc_gnode_compare): Ditto. * src/cache/ftcbasic.c: Include FT_INTERNAL_OBJECTS_H to use TRUE/FALSE macros. (ftc_basic_gnode_compare_faceid): New argument `FT_Bool* list_changed' to indicate the change of the cache nodes, anyway, it is always FALSE. * src/cache/ftccmap.c: Include FT_INTERNAL_OBJECTS_H to use TRUE/FALSE macros. (ftc_cmap_node_compare): New argument `FT_Bool* list_changed' to indicate the change of the cache nodes, anyway, it is always FALSE. (ftc_cmap_node_remove_faceid): Ditto. * src/cache/ftccache.c (FTC_Cache_NewNode): Pass a NULL pointer to FTC_CACHE_TRYLOOP_END(), because the result is not needed. (FTC_Cache_Lookup): Watch the change of the cache nodes by `list_changed'. (FTC_Cache_RemoveFaceID): Ditto. * src/cache/ftcglyph.c: Include FT_INTERNAL_OBJECTS_H to use TRUE/FALSE macros. (ftc_gnode_compare): New argument `FT_Bool* list_changed' to indicate the change of the cache nodes, anyway, it is always FALSE. (FTC_GNode_Compare): New argument `FT_Bool* list_changed' to be passed to ftc_gnode_compare(). * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto. * src/cache/ftcsbits.c (ftc_snode_compare): New argument `FT_Bool* list_changed' to indicate the change of the cache nodes, anyway. It is updated by FTC_CACHE_TRYLOOP(). (FTC_SNode_Compare): New argument `FT_Bool* list_changed' to be passed to ftc_snode_compare(). * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.
suzuki toshiya 62d116f8 2011-01-09T22:38:10 [cache] Fit FTC_GNode_Compare() to FTC_Node_CompareFunc. * src/cache/ftcglyph.h (FTC_GNode_Compare): Add the 3rd argument `FTC_Cache cache' to fit FTC_Node_CompareFunc prototype. * src/cache/ftcglyph.c (FTC_GNode_Compare): Ditto. Anyway, `cache' is not used by its child ftc_gnode_compare().
suzuki toshiya 9a2e255b 2011-01-09T21:09:58 [cache] Deduplicate the code to get the top node by a hash. There are several duplicated codes getting the top node from a cache by a given hash, like: idx = hash & cache->mask; if ( idx < cache->p ) idx = hash & ( cache->mask * 2 + 1 ); pnode = cache->buckets + idx; To deduplicate them, a cpp-macro to do same work FTC_NODE__TOP_FOR_HASH( cache, hash ) is introduced. For non-inlined config, non-ftc_get_top_node_for_hash() is also introduced. * src/cache/ftccache.h (FTC_NODE__TOP_FOR_HASH): Declare and implement inlined version. (FTC_CACHE_LOOKUP_CMP): Use FTC_NODE__TOP_FOR_HASH(). * src/cache/ftccache.c (ftc_get_top_node_for_hash): Non- inlined version. (ftc_node_hash_unlink): Use FTC_NODE__TOP_FOR_HASH(). (ftc_node_hash_link): Ditto. (FTC_Cache_Lookup): Ditto.
suzuki toshiya 52a1e47a 2011-01-09T20:47:37 [cache] inline-specific functions are conditionalized. * src/cache/ftcglyph.c (FTC_GNode_Compare): Conditionalized for inlined config. This function is a thin wrapper of ftc_gnode_compare() for inlined FTC_CACHE_LOOKUP_CMP() (see `nodecmp' argument). Under non-inlined config, ftc_gnode_compare() is invoked by FTC_Cache_Lookup(), via FTC_Cache->clazz.node_compare(). * src/cache/ftcglyph.h (FTC_GNode_Compare): Ditto. * src/cache/ftcsbits.c (FTC_SNode_Compare): Ditto, for ftc_snode_compare(). * src/cache/ftcsbits.h (FTC_SNode_Compare): Ditto.
suzuki toshiya 0de5b376 2011-01-09T20:31:22 [cache] Correct a type mismatch under non-inlined config. * src/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP): FTC_GCache_Lookup() takes the node via a pointer `FTC_Node*', differently from cpp-macro FTC_CACHE_LOOKUP_CMP().
Werner Lemberg f3ce2370 2011-01-03T07:11:54 */rules.mk: Handle `*pic.c' files.
Werner Lemberg fa1e6b35 2011-01-03T06:50:36 Formatting.
Werner Lemberg 91843dfc 2010-12-31T19:30:53 * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 64. Problem reported by Tom Bishop <wenlin@wenlin.com>.
Werner Lemberg fe42a653 2010-12-31T17:47:09 Improve bzip2 support. * include/freetype/ftmoderr.h: Add bzip2. * docs/INSTALL.ANY, docs/CHANGES: Updated. * src/pcf/README: Updated. * include/freetype/internal/pcftypes.h: Obsolete, removed.
Joel Klinghed ed913c21 2010-12-31T16:59:33 Add bzip2 compression support to handle *.pcf.bz2 files. * builds/unix/configure.raw: Test for libbz2 library. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_BZIP2): Define. * include/freetype/config/ftheader.h (FT_BZIP2_H): Define. * include/freetype/ftbzip2.h: New file. * src/bzip2/*: New files. * src/pcf/pcf.h: s/gzip_/comp_/. * src/pcf/pcfdrvr.c: Include FT_BZIP2_H. s/gzip_/comp_/. (PCF_Face_Init): Handle bzip2 compressed files. * docs/formats.txt, modules.cfg: Updated.
Harsha 7774ac67 2010-12-25T16:34:56 Apply Savannah patch #7422. If we encouter a space in a string then the sbit buffer is NULL, height and width are 0s. So the check in ftc_snode_compare will always pass for spaces (comparision with 255). Here the comments above the condition are proper but the implementation is not. When we create an snode I think it is the proper way to initialize the width to 255 and then put a check for being equal to 255 in snode compare function. * src/cache/ftcsbits.c (FTC_SNode_New): Initialize sbit widths with value 255. (ftc_snode_compare): Fix condition.
Werner Lemberg 312d26a4 2010-12-13T20:17:26 Fix parameter handling of `FT_Set_Renderer'. Reported by Kirill Tishin <siege@bk.ru>. * src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'.
Werner Lemberg 396b11b8 2010-12-09T23:16:18 [cff] Allow `hlineto' and `vlineto' without arguments. We simply ignore such instructions. This is invalid, but it doesn't harm; and indeed, there exist such subsetted fonts in PDFs. Reported by Albert Astals Cid <aacid@kde.org>. * src/cff/cffgload.c (cff_decoder_parse_charstrings) [cff_op_hlineto]: Ignore instruction if there aren't any arguments on the stack.
Алексей Подтележников 7c4ac3cb 2010-11-28T08:23:40 [ftsmooth]: Minor code simplification. * src/smooth/ftgrays (gray_render_cubic): Do only one comparison instead of two.
Johnson Y. Yan 9073e7ce 2010-11-26T11:58:08 [truetype] Better multi-threading support. * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone references.
John Tytgat ed7d1a59 2010-11-23T19:30:38 * src/psaux/t1decode.c (t1_decoder_parse_charstring): Expand start_point, check_points, add_point, add_point1, close_contour macros. Remove add_contour macro. Return error code from t1_builder_start_point and t1_builder_check_points when there was one (instead of returning 0).
Werner Lemberg 9871b849 2010-11-22T19:30:41 Some formatting and improvements of comments.
suzuki toshiya 9f5dd61b 2010-11-23T02:47:10 [truetype] Identify the tricky fonts by cvt/fpgm/prep checksums. Some Latin TrueType fonts are still expected to be unhinted. Fix Savannah bug #31645. * src/truetype/ttobjs.c (tt_check_trickyness): Divided to... (tt_check_trickyness_family): this checking family name, and (tt_check_trickyness_sfnt_ids): this checking cvt/fpgm/prep. (tt_get_sfnt_checksum): Function to retrieve the sfnt checksum for specified subtable even if cleared by lazy PDF generators. (tt_synth_sfnt_checksum): Function to calculate the checksum.
Werner Lemberg ec4372f5 2010-11-18T20:34:22 [truetype] Fix `loca' handling for inconsistent number of glyphs. Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>. * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing, handle case where `loca' is the last table in the font.
Werner Lemberg fa764cf8 2010-11-18T13:08:52 [sfnt] Ignore all errors while loading `OS/2' table. Suggested by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>. * src/sfnt/sfobjs.c (sfnt_load_face): Do it.
Johnson Y. Yan b70d8a0e 2010-11-18T10:36:59 [type1] Fix matrix normalization. * src/type1/t1load.c (parse_font_matrix): Handle sign of scaling factor.
Werner Lemberg f689bf7d 2010-11-18T10:28:16 [type1]: Improve guard against malformed data. Based on a patch submitted by Johnson Y. Yan <yinsen_yan@foxitsoftware.com> * src/type1/t1load.c (read_binary_data): Check `size'.
Werner Lemberg 05012ad9 2010-11-17T11:47:53 [sfnt] While tracing, output table checksums also. * src/sfnt/ttload.c (tt_face_load_font_dir): Do it.
suzuki toshiya ac09390a 2010-11-04T23:26:11 [UVS] Fix find_variant_selector_charmap(), Savannah bug #31545. Since 2010-07-04, find_variant_selector_charmap() returns the first cmap subtable always under rogue-compatible configuration, it causes NULL pointer dereference and make UVS-related functions crashed. * src/base/ftobjs.c (Fix find_variant_selector_charmap): Returns UVS cmap correctly.
suzuki toshiya b72e0460 2010-11-04T23:09:05 [UVS] Remove non-essential pointer checking in previous commit.
suzuki toshiya e891e4d6 2010-11-04T21:53:11 [UVS] Stabilizes UVS supporting functions against non-UVS fonts. UVS supporting functions assume the variation handler functions are valid. When a font without cmap format 14 is given, these function pointers are left as NULL, so calling these functions causes NULL pointer dereference. * src/base/ftobjs.c (FT_Face_GetCharVariantIndex): Check the pointer FT_CMap_Class->char_var_index before calling it. (FT_Face_GetCharVariantIsDefault): Check the pointer FT_CMap_Class->char_var_default before calling it. (FT_Face_GetVariantSelectors): Check the pointer FT_CMap_Class->variant_list before calling it. (FT_Face_GetVariantsOfChar): Check the pointer FT_CMap_Class->charvariant_list before calling it. (FT_Face_GetCharsOfVariant): Check the pointer FT_CMap_Class->variantchar_list before calling it.
Alexei Podtelezhnikov 6aee6909 2010-11-02T16:01:03 [ftsmooth] Improve rendering. * src/smooth/ftsmooth.c (gray_render_conic): Since version 2.4.3, cubic deviations have been estimated _after_ UPSCALE, whereas conic ones have been evaluated _before_ UPSCALE, which produces inferior rendering results. Fix this. Partially undo change from 2010-10-15 by using ONE_PIXEL/4; this has been tested with demo images sent to the mailing list. See http://lists.gnu.org/archive/html/freetype-devel/2010-10/msg00055.html and later mails in this thread.
Werner Lemberg 6a96bbe2 2010-10-28T08:51:15 [ftraster] Minor fixes. Reported by Tom Bishop <wenlin@wenlin.com>. * src/raster/ftraster.c (ULong): Remove unused typedef. (TWorker): Remove unused variable `precision_mask'.
Werner Lemberg f0987abd 2010-10-28T08:33:28 [ftraster] Fix rendering. Problem reported by Tom Bishop <wenlin@wenlin.com>; see thread starting with http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv since the involved multiplication exceeds 32 bits.
suzuki toshiya 875439cf 2010-10-25T15:43:01 Revert a change of `_idx' type in FTC_CACHE_LOOKUP_CMP(). * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Revert the type of `_idx' from FT_PtrDist (by previous change) to original FT_UFast, to match with FT_CacheRec.
suzuki toshiya 3512a712 2010-10-25T02:07:52 [cache] Change the hash types to FT_PtrDist. On LLP64 platforms (e.g. Win64), FT_ULong (32-bit) variables are inappropriate to calculate hash values from the memory address (64-bit). The hash variables are extended from FT_ULong to FT_PtrDist and new hashing macro functions are introduced. The hash values on 16-bit memory platforms are changed, but ILP32 and LP64 are not changed. The hash value in the cache subsystem is not reverted to the memory address, so using signed type FT_PtrDist is safe. * src/cache/ftccache.h (_FTC_FACE_ID_HASH): New hash function to replace FTC_FACE_ID_HASH() for portability. * src/cache/ftcmanag.h (FTC_SCALER_HASH): Replace FTC_FACE_ID_HASH() by _FTC_FACE_ID_HASH(). * src/cache/ftccmap.c (FTC_CMAP_HASH): Ditto. * src/cache/ftccache.h (FTC_NodeRec): The type of the member `hash' is changed from FT_UInt32 to FT_PtrDist. * src/cache/ftccache.h (FTC_Cache_Lookup): The type of the argument `hash' is changed from FT_UInt32 to FT_PtrDist. (FTC_Cache_NewNode): Ditto. * src/cache/ftccache.c (ftc_cache_add): Ditto. (FTC_Cache_Lookup): Ditto. (FTC_Cache_NewNode): Ditto. * src/cache/ftcglyph.h (FTC_GCache_Lookup): Ditto. * src/cache/ftcglyph.c (FTC_GCache_Lookup): Ditto. * src/cache/ftcbasic.c (FTC_ImageCache_Lookup): The type of the internal variable `hash' is changed to FT_PtrDist from FT_UInt32. (FTC_ImageCache_LookupScaler): Ditto. (FTC_SBitCache_Lookup): Ditto. (FTC_SBitCache_LookupScaler): Ditto. * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Ditto. * src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Ditto. Also the type of the internal variable `_idx' is changed to FT_PtrDist from FT_UInt32 for better pointer calculation.
suzuki toshiya b8b498f2 2010-10-25T00:35:59 Change the type of FT_MEM_VAL() from FT_ULong to FT_PtrDist. On LLP64 platforms (e.g. Win64), unsigned long (32-bit) cannot cover the memory address (64-bit). FT_MEM_VAL() is used for hashing only and not dereferred, so using signed type FT_PtrDist is safe. * src/base/ftdbgmem.c (FT_MEM_VAL): Change the type of the return value from FT_ULong to FT_PtrDist. (ft_mem_table_resize): The type of hash is changed to FT_PtrDist. (ft_mem_table_get_nodep): Ditto.
suzuki toshiya 46c371c2 2010-10-25T00:14:13 Replace "%lx" for memory address by "%p", LLP64 platforms. On LLP64 platforms (e.g. Win64), long (32-bit) cannot cover the memory address (64-bit). Also the casts from the pointer type to long int should be removed to preserve the address correctly. * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p". (End_Profile) Ditto. * src/truetype/ttinterp.c (Init_Context): Ditto.
Werner Lemberg 34d61e86 2010-10-15T20:44:15 Fix thinko in spline flattening. FT_MAX_CURVE_DEVIATION is dependent on the value of ONE_PIXEL. * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): Remove it and replace it everywhere with ONE_PIXEL/8.
suzuki toshiya 463dddad 2010-10-13T17:20:27 [raccess] Skip unrequired resource access rules by Darwin VFS. When a resource fork access rule by Darwin VFS could open the resource fork but no font is found in it, the rest of rules by Darwin VFS are skipped. It reduces the warnings of the deprecated resource fork access method by recent Darwin kernel. Fix MacPorts ticket #18859: http://trac.macports.org/ticket/18859 * src/base/ftobjs.c (load_face_in_embedded_rfork): When FT_Stream_New() returns FT_Err_Cannot_Open_Stream, it means that the file is possible to be fopen()-ed but zero-sized. Also there is a case that the resource fork is not zero-sized, but no supported font exists in it. If a rule by Darwin VFS falls into such cases, there is no need to try other Darwin VFS rules anymore. Such cases are marked by vfs_rfork_has_no_font. If it is TRUE, the Darwin VFS rules are skipped.
suzuki toshiya c081a4a9 2010-10-13T17:05:42 [raccess] Grouping resource access rules based on Darwin VFS. MacOS X/Darwin kernel supports a few tricky methods to access a resource fork via ANSI C or POSIX interface. Current resource fork accessor tries all possible methods to support all kernels. But if a method could open a resource fork but no font is found, there is no need to try other methods older than tested method. To determine whether the rule index is for Darwin VFS, a local function ftrfork.c::raccess_rule_by_darwin_vfs() is introduced. To use this function in ftobjs.c etc but it should be inlined, it is exposed by ftbase.h. * src/base/ftrfork.c (FT_RFork_Rule): New enum type to identify the rules to access the resource fork. (raccess_guess_rec): New structure to bind the rule function and rule enum type. (FT_Raccess_Guess): The list of the rule functions is replaced by (raccess_guess_table): This. This is exposed to be used by other intra module functions. (raccess_rule_by_darwin_vfs): A function to return a boolean if the rule specified by the rule index is based on Darwin VFS.
suzuki toshiya 4b718714 2010-10-13T16:21:59 Prevent to open a FT_Stream for zero-sized file on non-Unix. builds/unix/ftsystem.c prevents to open an useless stream from zero-sized file and returns FT_Err_Cannot_Open_Stream, but the stream drivers for ANSI C, Amiga and VMS return useless streams. For cross-platform consistency, all stream drivers should act same. * src/base/ftsystem.c (FT_Stream_Open): If the size of the opened file is zero, FT_Err_Cannot_Open_Stream is returned. * builds/amiga/src/base/ftsystem.c (FT_Stream_Open): Ditto. * src/vms/ftsystem.c (FT_Stream_Open): Ditto.
Werner Lemberg 59eb9f8c 2010-10-12T07:49:17 Fix Savannah bug #31310. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against invalid `runcnt' values.
Chris Liddell bc4ed48e 2010-10-08T18:40:18 Fix Savannah bug #31275. * src/sfnt/ttpost.c: Include FT_INTERNAL_DEBUG_H.
Ed 4afa9d74 2010-10-08T12:05:40 Typo.
Werner Lemberg 0edf0986 2010-10-06T11:52:27 [truetype] Improve error handling of `SHZ' bytecode instruction. Problem reported by Chris Evans <scarybeasts@gmail.com>. * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'.
Werner Lemberg 3987b15e 2010-10-02T11:46:19 Fix Savannah bug #31088 (sort of). * src/sfnt/ttload.c (tt_face_load_maxp): Always allocate at least 64 function entries.
Werner Lemberg 0e6fc091 2010-10-02T09:05:46 [smooth] Fix splitting of cubics for negative values. Reported by Róbert Márki <gsmiko@gmail.com>; see http://lists.gnu.org/archive/html/freetype/2010-09/msg00019.html. * src/smooth/ftgrays.c (gray_render_cubic): Fix thinko.
suzuki toshiya 5edc2f33 2010-10-01T08:15:55 Fix Savannah bug #31040. * src/truetype/ttinterp.c (free_buffer_in_size): Remove. (TT_RunIns): Updated.
suzuki toshiya d2b8b8db 2010-09-20T19:06:23 [sfnt] Make error message filling NULL names less verbose. * src/sfnt/ttpost.c (load_format_20): Showing 1 summary message when we fill `post' names by NULL, instead of per-entry message.
Graham Asher e0a9a933 2010-09-20T09:29:23 [smooth] Fix and improve spline flattening. This fixes the flattening of cubic, S-shaped curves and speeds up the handling of both the conic and cubic arcs. See the discussions on the freetype-devel mailing list in late August and September 2010 for details. * src/smooth/ftgrays.c (FT_MAX_CURVE_DEVIATION): New macro. (TWorker): Remove `conic_level' and `cubic_level' elements. (gray_render_conic): Simplify algorithm. (gray_render_cubic): New algorithm; details are given in the code comments. (gray_convert_glyph): Remove heuristics.
Werner Lemberg d38ba0c9 2010-09-19T20:51:19 Minor fixes. * src/cff/cffload.c (cff_charset_compute_cids): `charset->sids[i]' is `FT_UShort'. (cff_index_access_element): Don't use additions in comparison. * src/sfnt/ttpost.c (load_format_20): Make `post_limit' of type `FT_Long'. Don't use additions in comparison. Improve tracing messages. (load_format_25, load_post_names): Make `post_limit' of type `FT_Long'.
suzuki toshiya 73aa20ca 2010-09-20T01:30:38 [cff] Truncate the element length at the end of the stream. See Savannah bug #30975. * src/cff/cffload.c (cff_index_access_element): `off2', the offset to the next element is truncated at the end of the stream to prevent invalid I/O. As `off1', the offset to the requested element has been checked by FT_STREAM_SEEK(), `off2' should be checked similarly.
suzuki toshiya d2d843a0 2010-09-20T01:28:17 [cff] Ignore CID > 0xFFFFU. See Savannah bug #30975. * src/cff/cffload.c (cff_charset_compute_cids): Ignore CID if greater than 0xFFFFU. CFF font spec does not mention about maximum CID in the font, but PostScript and PDF spec define that maximum CID is 0xFFFFU.
suzuki toshiya a0f43f20 2010-09-20T01:26:56 [cff] Make trace message in cff_charset_load() verbose. See Savannah bug #30975. * src/cff/cffload.c (cff_charset_load): Report the original `nleft' and truncated `nleft'.
suzuki toshiya b3e1954d 2010-09-20T01:22:34 [cff] Correct `max_cid' from CID array length to max CID. See Savannah bug #30975. * src/cff/cffload.c (cff_charset_compute_cids): Don't increment max_cid after detecting max CID. The array CFF_Charset->cids is allocated by max_cid + 1. (cff_charset_cid_to_gindex): Permit CID is less than or equal to CFF_Charset->max_cid. * src/cff/cffobjs.c (cff_face_init): FT_Face->num_glyphs is calculated as CFF_Charset->max_cid + 1.
suzuki toshiya 643d49df 2010-09-20T01:07:57 [truetype] Sanitize the broken offsets in `loca'. * src/truetype/ttpload.c (tt_face_get_location): If `pos1', the offset to the requested entry in `glyf' exceeds the end of the table, return offset=0, length=0. If `pos2', the offset to the next entry in `glyf' exceeds the end of the table, truncate the entry length at the end of `glyf' table. See Savannah bug #31040.
suzuki toshiya 900e7e0c 2010-09-20T01:03:36 [sfnt] Prevent overrunning in `post' table parser. * src/sfnt/ttpost.c (load_post_names): Get the length of `post' table and pass the limit of `post' table to load_format_20() and load_format_25(). (load_format_20): Stop the parsing when we reached at the limit of `post' table. If more glyph names are required, they are filled by NULL names. See Savannah bug #31040.
suzuki toshiya db053ec9 2010-09-17T23:20:00 [truetype] Don't duplicate size->twilight structure to be freed. * src/truetype/ttinterp.c (free_buffer_in_size): Don't duplicate FT_GlyphZoneRec size->twilight to be freed. If duplicated, FT_FREE() erases the duplicated pointers only and leave original pointers. They can cause the double-free crash when the burst errors occur in TrueType interpreter and free_buffer_in_size() is invoked repeatedly. See Savannah bug #31040 for detail.
Werner Lemberg afd89d30 2010-09-15T13:02:35 Make bytecode debugging with FontForge work again. * src/truetype/ttinterp.c (TT_RunIns): Don't call `free_buffer_in_size' in case of error if a debugger is active.
Werner Lemberg 6abb9232 2010-09-14T09:02:10 Improve tracing messages. * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing message. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add tracing message. * src/truetype/ttgload.c (tt_loader_init): Add tracing message. * src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if glyph doesn't fit into a small bitmap container.
Werner Lemberg 5220ef58 2010-09-13T07:32:22 Fix minor issues reported by <muktha.narayan@wipro.com>. * src/autofit/aflatin.c (af_latin_compute_stem_width): Remove redundant conditional check. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto. * src/cff/cffload.c (cff_encoding_load): Remove conditional check which always evaluates to `true'. * src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points): Ditto. * src/truetype/ttinterp.c (Ins_IUP): Ditto. * src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if value is already dereferenced. * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.