src


Log

Author Commit Date CI Message
Werner Lemberg 01705395 2013-07-18T13:13:12 [sfnt] Add support for Apple's `sbix' color bitmap table. * include/freetype/internal/tttypes.h (TT_SBit_MetricsRec): Widen fields to FT_Short and FT_UShort, respectively. (TT_SBitTableType): New enumeration. (TT_FaceRec): Add `sbit_table_type' field. * include/freetype/tttags.h (TTAG_sbix): New macro. * src/sfnt/pngshim.c (Load_SBit_Png): Pass a more generic FT_GlyphSlot argument instead FT_Bitmap. Add flag to control map and metrics handling. Update all users. * src/sfnt/ttsbit.c: Include `ttmtx.h'. (tt_face_load_eblc): Renamed to... (tt_face_load_sbit): This. Handlic `sbix' bitmaps. (tt_face_free_eblc): Renamed to... (tt_face_load_sbit): This. Updated. (tt_face_load_strike_metrics): Handle `sbix' bitmaps. (tt_face_load_sbix_image): New function. (tt_sbit_decoder_alloc_bitmap, tt_sbit_decoder_load_image, tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png, tt_sbit_decoder_load_image, tt_sbit_decoder_load_bitmap): Don't pass and handle load flags. (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG]: Better handle formats 17-19. Move color to grayscale conversion to... (tt_face_load_sbit_image): Here. Handle `sbix' bitmaps. * src/sfnt/pngshim.h: Updated. * src/sfnt/ttsbit.h: Updated. * src/sfnt/sfdriver.c: Updated.
Werner Lemberg 274207eb 2013-07-18T12:38:57 [sfnt] Ignore invalid magic number in `head' or `bhed'. Other font engines seem to ignore it also. Problem reported by Hin-Tak Leung <htl10@users.sourceforge.net>. * src/sfnt/ttload.c (check_table_dir): Don't abort but warn only if we have an invalid magic number.
Werner Lemberg 9a7951d9 2013-07-16T15:25:24 [smooth] Fix segfault caused by previous commit. * src/smooth/ftgrays.c (gray_set_cell): Always compute `ras.invalid'.
David Turner 89929ec6 2013-07-16T13:36:07 [smooth] Improve performance. Provide a work-around for an ARM-specific performance bug in GCC. This speeds up the rasterizer by more than 5%. Also slightly optimize `set_gray_cell' and `gray_record_cell' (which also improves performance on other platforms by a tiny bit (<1%). * src/smooth/ftgrays.c (FT_DIV_MOD): New macro. Use it where appropriate. (gray_record_cell, gray_set_cell, gray_move_to, gray_convert_glyph_inner): Streamline condition handling.
David Turner f66d48e9 2013-07-16T13:18:00 Add assembler code for TT_MulFix14 and TT_DotFix14. This patch provides slightly optimized versions for ARM, x86, and x86_64 CPUs if built with GCC. Also remove some dead code. * src/truetype/ttinterp.c (TT_MulFix14_arm, TT_MulFix14_long_long, TT_DotFix14_long_long): New functions.
Werner Lemberg aa0ac323 2013-07-02T10:36:26 [sfnt] Fix documentation of `tt_face_get_metrics'. Problem reported in Savannah bug #39383.
Werner Lemberg 680c1d40 2013-06-27T17:21:59 * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix bitmap width guard.
Werner Lemberg b8850fc1 2013-06-26T12:22:10 [cff] Add darkening limit to `darkening-parameters'. * src/cff/cffdrivr.c (cff_property_set): Add check.
Werner Lemberg 89ca1fd6 2013-06-25T23:28:02 [cff] Add `darkening-parameters' property. * include/freetype/ftcffdrv.h: Document it. * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle `darkening-parameters' property. * src/cff/cf2font.h (CF2_FontRec): Add `darkenParams' array. * src/cff/cf2font.c (cf2_computeDarkening): Add `darkenParams' argument and use it. Update all callers. * src/cff/cf2ft.c (cf2_decoder_parse_charstrings): Copy `darken_params' values. * src/cff/cffobjs.h (CFF_DriverRec): Add `darken_params' array. * src/cff/cffobjs.c (cff_driver_init): Set default values for `darken_params'.
Werner Lemberg fad93267 2013-06-25T10:41:37 [docmaker] Code shuffling. * src/tools/docmaker/tohtml.py (re_url): Move regexp... * src/tools/docmaker/sources.py: ... to this file.
Werner Lemberg 8bdc4071 2013-06-25T10:20:53 [docmaker] Remove unused functions. * src/tools/docmaker/content.py (DocMarkup.get_start, DocBlock.get_markup_name): Removed. * src/tools/docmaker/tohtml.py (html_quote0, dump_html_code, HtmlFormatter.make_html_words): Removed.
Werner Lemberg c7cc9ebe 2013-06-25T07:24:02 [docmaker] Recognise URLs. * src/tools/docmaker/tohtml.py (re_url): New regular expression. (make_html_para): Use it.
Werner Lemberg 3da51828 2013-06-23T09:48:20 Fix comment.
Werner Lemberg 25b7da53 2013-06-19T10:23:36 * Version 2.5.0 released. ========================= Tag sources with `VER-2-5-0'. * docs/VERSION.DLL: Update documentation and bump version number to 2.5.0. * README, Jamfile (RefDoc), builds/win32/vc2005/freetype.vcproj, builds/win32/vc2005/index.html, builds/win32/vc2008/freetype.vcproj, builds/win32/vc2008/index.html, builds/win32/vc2010/freetype.vcxproj, builds/win32/vc2010/index.html, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype.vcproj, builds/win32/visualc/index.html, builds/win32/visualce/freetype.dsp, builds/win32/visualce/freetype.vcproj, builds/win32/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.4.12/2.5.0/, s/2412/250/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 5. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 16:2:10. * src/base/ftobjs.c (FT_Open_Face): Pacify compiler. * src/truetype/ttinterp.c (Ins_MSIRP, Ins_MIRP): Ditto.
Werner Lemberg f56691a8 2013-06-18T10:17:48 Fix Savannah bug #39269. * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Free memory in case of reacollocation failures.
Andrew Church 67cf7a88 2013-06-18T09:35:34 Fix Savannah bug #39266. If memory allocations fail at certain points while opening a font, FreeType can either crash due to a NULL dereference or leak memory. * include/freetype/internal/ftobjs.c (FT_Face_InternalRec, FT_LibraryRec): Make `refcount' a signed integer. If, for example, FT_Open_Face() fails in a memory allocation before the face's reference count is set to 1, a subsequent `FT_Done_Library' call would otherwise loop over `FT_Done_Face' 2^32 times before freeing the face. * src/base/ftobjs.c (open_face): Initialize `stream' and friends earlier. (FT_Open_Face) <Fail>: Behave correctly if `node' is NULL. (FT_Destroy_Module) <Fail>: Check that `renderer_clazz' is valid.
Werner Lemberg d7e3444b 2013-06-14T18:33:39 * src/smooth/ftgrays.c One final pragma to silence 64-bit MSVC.
Dave Arnold cb23a628 2013-06-13T07:46:32 [cff] Add code to Adobe's engine to handle ppem > 2000. * src/cff/cffgload.c (cff_slot_load): If we get FT_Err_Glyph_Too_Big, retry unhinted and scale up later on.
Werner Lemberg c06889eb 2013-06-12T10:58:06 More compiler warning fixes. */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
Werner Lemberg 5e094c6f 2013-06-10T14:59:21 [truetype] Improve handling of broken sbit advance widths. * src/truetype/ttgload.c (TT_Load_Glyph): Use the glyph's (scaled) `linearHoriAdvance' if the sbit's `horiAdvance' value is zero. Cf. font `Fixedsys Excelsior' v3.01 (FSEX300.ttf), glyph A, 16ppem.
Werner Lemberg a25ecfdd 2013-06-10T12:57:16 [sfnt] Improve embedded bitmap tracing. * src/base/ftobjs.c (FT_Request_Size): Move trace message regarding bitmap strike match to... (FT_Match_Size): This function. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_metrics, tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound, tt_sbit_decoder_load_png, tt_sbit_decoder_load_image): Decorate with tracing messages.
Werner Lemberg 99e60d84 2013-06-10T01:44:37 Fix Savannah bug #39160. * src/truetype/ttinterp.c (Ins_SDPVTL): Set projection vector too for the degenerate case.
Werner Lemberg 2ba871b2 2013-06-09T08:20:54 * src/cache/ftcmanag.c (FTC_Manager_Reset): Add missing cache flush. This code, present since eight(!) years in the unused `CACHE' branch, has been forgotten to apply to the master branch. It's really amazing that noone has ever complained since `FTC_Manager_Reset' is pretty useless without flushing the cache.
Werner Lemberg 3f6e0e0c 2013-06-07T18:10:40 Add and improve pragmas for MSVC compiler. * include/freetype/internal/ftdebug.h: Remove pragmas. * include/freetype/internal/ftserv.h: Use push and pop for pragmas. * include/freetype/internal/ftvalid.h: Handle warning C4324. * src/base/ftobjs.c: Use push and pop for pragmas. * src/gzip/ftgzip.c: Handle warning C4244.
Werner Lemberg 85fd84b8 2013-06-07T17:10:21 [cff] s/cf2_getGlyphWidth/cf2_getGlyphOutline/. * src/cff/cf2font.c, src/cff/cf2font.h, src/cff/cf2ft.c: Do it.
Werner Lemberg 4447b2c8 2013-06-06T21:28:36 [cff] Add early exit feature for width-only calls. This is for `FT_Get_Advance'. There are 7 places where the spec says the width can be defined: hstem/hstemhm vstem/vstemhm cntrmask/hintmask hmoveto vmoveto rmoveto endchar * src/cff/cf2intrp.c (cf2_doStems): Exit early for width-only calls, if possible. (cf2_interpT2CharString) <cf2_cmdHSTEM>, <cf2_cmdVSTEM>, <cf2_cmdVMOVETO>, <cf2_cmdENDCHAR>, <cf2_cmdHINTMASK>, <cf2_cmdRMOVETO>, <cf2_cmdHMOVETO>: Exit early for width-only calls.
Werner Lemberg badf3178 2013-06-06T09:16:38 Next round of compiler fixes. * builds/win32/ftdebug.c, builds/wince/ftdebug.c (ft_debug_init): Add proper cast. * include/freetype/internal/ftserv.h (FT_SERVICE_UNAVAILABLE): Fix cast. * include/freetype/internal/ftstream.h: Decorate stream and frame macros with `FT_Long' and `FT_ULong' as appropriate. * src/base/ftrfork.c (raccess_guess_darwin_hfsplus, raccess_guess_darwin_newvfs): Use cast. * src/bdf/bdflib.c (_bdf_set_default_spacing): Use cast. * src/cache/ftcmanag.c (FTC_Manager_Check): Fix cast. * src/cache/ftcmanag.h (FTC_ManagerRec): Ditto. * src/cff/cf2arrst.c (cf2_arrstack_setNum_Elements): Use cast. * src/cff/cf2ft.c (cf2_freeSeacComponent): Ditto. * src/cff/cffobjs.c (remove_subset_prefix, remove_style): Ditto. * src/cid/cidparse.c (cid_parser_new): Use cast. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Use cast. * src/psaux/psobjs.c (reallocate_t1_table): Fix argument type. * src/raster/ftraster.c (ft_black_reset): Use cast. * src/truetype/ttgxvar.c (FT_Stream_FTell): Use cast. (ALL_POINTS): Fix cast. * src/type1/t1driver.c (t1_ps_get_font_value): Add casts. * src/type1/t1parse.c (T1_Get_Private_Dict): Add cast.
Dave Arnold c378249e 2013-06-05T19:57:55 Fix more MSVC Win32 compiler warnings. * src/base/ftobjs.c: Fix typo in MS pragma. * src/base/bdflib.c (_bdf_set_default_spacing, _bdf_add_property): `lineno' is only used in debug mode. * src/cff/cf2ft.c (cf2_builder_moveTo): `params' is only used in debug mode.
Werner Lemberg 9ef0bc00 2013-06-05T14:53:27 Minor formatting.
Werner Lemberg 45392b77 2013-06-05T13:43:20 Fix compiler warnings. * include/freetype/internal/ftmemory.h: Decorate memory allocation macros with `FT_Long' where appropriate. Remove duplicate of FT_MEM_QRENEW_ARRAY definition. * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Use cast. * src/base/ftobjs.c: Add warning disabling pragma for MSVC while including `md5.c'. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdESC>: Add cast. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Fix casts. (tt_sbit_decoder_load_bitmap): Beautification. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Initialize variables (earlier). * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Pacify compiler. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Use unsigned constants where appropriate. * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
Werner Lemberg d963498f 2013-06-04T20:18:57 * src/cff/cf2font.c (cf2_getGlyphWidth): Initialize `advWidth'. Problem reported by Ingmar Sittl <ingmar.sittl@elektrobit.com>.
Werner Lemberg 8d8508e4 2013-06-04T13:09:01 Missed some cppcheck items.
Werner Lemberg dc624ca4 2013-06-04T10:30:48 Apply fixes for cppcheck nitpicks. http://cppcheck.sourceforge.net/ Note that the current version heavily chokes on FreeType, delivering even wrong results. I will report those issues to the cppcheck team so that a newer version gives improved results hopefully. */* Improve variable scopes. */* Remove redundant initializations which get overwritten. * src/base/ftmac.c ,builds/mac/ftmac.c (count_faces_scalable): Remove unused variable. * src/base/ftdbgmem.c (ft_mem_table_destroy): `table' can't be zero. * src/gxvalid/gxvkern.c (gxv_kern_subtable_fmt1_entry_validate): Remove functionless code. * src/tools/ftrandom.c (main): Fix memory leak.
Werner Lemberg 2429dc3d 2013-06-03T12:41:58 Add CFF_CONFIG_OPTION_OLD_ENGINE configuration option. This controls whether the old FreeType CFF engine gets compiled into FreeType. It is now disabled by default. * devel/ftoption.h, include/freetype/config/ftoption.h (CFF_CONFIG_OPTION_OLD_ENGINE): New macro. * src/cff/cffdrivr.c (cff_property_set), src/cff/cffgload.c (CFF_Operator, cff_argument_counts, cff_builder_add_point, cff_operator_seac, cff_decoder_parse_charstrings, cff_slot_load), src/cff/cffgload.h, src/cff/cffobjs.c (cff_driver_init): Use CFF_CONFIG_OPTION_OLD_ENGINE to guard the affected code. * docs/CHANGES: Updated.
Behdad Esfahbod 760d342d 2013-05-29T11:36:18 Add support for color embedded bitmaps (eg. color emoji). A new load flag, FT_LOAD_COLOR, makes FreeType load color embedded-bitmaps, following this draft specification https://color-emoji.googlecode.com/git/specification/v1.html which defines two new SFNT tables, `CBDT' and `CBLC' (named and modeled after `EBDT' and `EBLC', respectively). The color bitmaps are stored in the new FT_PIXEL_MODE_BGRA format to represent BGRA pre-multiplied sRGB images. If PNG support is available, PNG color images as defined in the same proposed specification are supported also. Note that color bitmaps are converted to grayscale if client didn't ask for color. * builds/unix/configure.raw: Search for libpng. Add `--without-png' option. * devel/ftoption.h, include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_PNG): New macro. * include/freetype/freetype.h (FT_LOAD_COLOR): New load flag. * include/freetype/ftimage.h (FT_Pixel_Mode): Add `FT_PIXEL_MODE_BGRA'. * include/freetype/tttags.h (TTAG_CBDT, TTAG_CBLC): New tags. * src/base/ftbitmap.c (FT_Bitmap_Embolden): Updated. (ft_gray_for_premultiplied_srgb_bgra): New function. (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_BGRA. * src/sfnt/pngshim.c, src/sfnt/pngshim.h: New files. * src/sfnt/sfnt.c: Include `pngshim.c'. * src/sfnt/ttsbit.c: Include FT_BITMAP_H and `pngshim.h' (tt_face_load_eblc): Load `CBLC'. (tt_sbit_decoder_init): Load `CBDT'. (tt_sbit_decoder_alloc_bitmap): Pass load flags to select between color and grayscale bitmaps. Set `num_grays'. This is used by `ftview' to choose the blending algorithm. (tt_sbit_decoder_load_byte_aligned, tt_sbit_decoder_load_bit_aligned, tt_sbit_decoder_load_compound, tt_sbit_decoder_load_image): Pass load flag. s/write/pwrite/. Don't call `tt_sbit_decoder_alloc_bitmap'. Updated. (tt_sbit_decoder_load_png) [FT_CONFIG_OPTION_USE_PNG]: New function. (tt_sbit_decoder_load_bitmap): Pass load flag. Handle new glyph formats 17, 18, and 19. Call `tt_sbit_decoder_alloc_bitmap'. Flatten color bitmaps if necessary. (tt_face_load_sbit_image): Updated. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `pngshim.c'. * docs/CHANGES: Updated.
Guenter 41e4480e 2013-05-24T11:38:09 Apply Savannah patch #8055. Make `apinames' create an import file for NetWare. * src/tools/apinames.c (PROGRAM_VERSION): Set to 0.2. (OutputFormat): Add `OUTPUT_NETWARE_IMP'. (names_dump): Handle it. (usage): Updated. (main): Handle new command line flag `-wN'.
Behdad Esfahbod 2d6e1fbc 2013-05-23T08:01:20 Compilation fix. * src/truetype/ttinterp.c (TT_RunIns) [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Make it work.
Infinality 3c783c1b 2013-05-21T21:03:00 [truetype] Formatting and an additional subpixel tweak.
Infinality 18f35ed1 2013-05-21T20:51:15 [truetype] Adjust subpixel zp2 moves and tweak rules.
Infinality 63bfa832 2013-05-20T07:38:21 [truetype] Simplify and improve subpixel function detection. Some small enhancements have allowed the removal of many macros and the simplification of existing rules in `ttsubpix.c'. * src/truetype/ttsubpix.h (SPH_TWEAK_ALLOW_X_DMOVEX, SPH_TWEAK_ALLOW_X_MOVE_ZP2, SPH_TWEAK_DELTAP_SKIP_EXAGGERATED_VALUES, SPH_TWEAK_SKIP_INLINE_DELTAS, SPH_TWEAK_MIRP_CVT_ZERO): Removed. (SPH_TWEAK_SKIP_NONPIXEL_Y_MOVES_DELTAP): New rule macro. * src/truetype/ttsubpix.c: Updated affected rules. * src/truetype/ttinterp.c (Direct_Move_X): Updated. (INS_FDEF): Add additional function detection. (INS_ENDF): Set runtime flag. (Ins_CALL): Skip the call under certain conditions. Remove bad code. (Ins_LOOPCALL): Skip the call under certain conditions. Remove bad code. (Move_Zp2_Point): Updated. (Ins_SHPIX): Updated. Skip the move under some situations. (Ins_MIAP): Improve conditions. (Ins_MIRP): Updated. (Ins_DELTAP): Skip move under certain conditions. Simplify conditions. (TT_RunIns): Updated. Add code to handle new function detection. Trace messages.
Werner Lemberg f04951af 2013-05-17T13:51:07 [truetype] Add `interpreter-version' property. This makes the option TT_CONFIG_OPTION_SUBPIXEL_HINTING controllable at runtime. * src/truetype/ttdriver.c: Include FT_TRUETYPE_DRIVER_H. (tt_property_set, tt_property_get): Fill templates. * src/truetype/ttobjs.h (TT_DriverRec): Add `interpreter_version' member. Remove unused `extension_component' member. * src/truetype/ttgload.c: Include FT_TRUETYPE_DRIVER_H. (tt_get_metrics, TT_Hint_Glyph, TT_Process_Simple_Glyph, compute_glyph_metrics, tt_loader_init): Use `interpreter_version'. * src/truetype/ttinterp.c: Include FT_TRUETYPE_DRIVER_H. (SUBPIXEL_HINTING): New macro to check `interpreter_version' flag. Update all affected functions to use it. Use TT_INTERPRETER_VERSION_XXX where appropriate. * src/truetype/ttobjs.c: Include FT_TRUETYPE_DRIVER_H. (tt_driver_init): Initialize `interpreter_version'. * src/truetype/ttsubpix.c: Include FT_TRUETYPE_DRIVER_H. Use TT_INTERPRETER_VERSION_XXX where appropriate.
Werner Lemberg 6650be7c 2013-05-13T10:05:29 [truetype] Avoid empty source file. * src/truetype/ttsubpix.c [!TT_CONFIG_OPTION_SUBPIXEL_HINTING]: Provide dummy typedef.
Werner Lemberg 7441dd87 2013-05-13T09:12:46 * src/cff/cf2font.c (cf2_getGlyphWidth): Fix uninitialized variable. Fix suggested by Vaibhav Nagarnaik <vnagarnaik@gmail.com>.
Brian Nixon 8d6025c8 2013-05-13T09:06:42 Fix Savannah bug #38970. * src/base/ftdebug.c, builds/win32/ftdebug.c, builds/wince/ftdebug.c, builds/amiga/src/base/ftdebug.c (ft_debug_init): Don't read past the environment variable FT2_DEBUG.
Werner Lemberg cd888753 2013-05-12T15:08:57 [truetype] Add framework for TrueType properties. * src/truetype/ttdrivr.c: Include FT_SERVICE_PROPERTIES_H. (tt_property_set, tt_property_get): New functions, still empty. Define `tt_service_properties' service. Update `tt_services'. * src/truetype/ttpic.h: Include FT_SERVICE_PROPERTIES_H. (TT_SERVICE_PROPERTIES_GET): New macro. (TTModulePIC): Add `tt_service_properties'.
Werner Lemberg b112fa41 2013-05-12T07:29:04 Fix Savannah bug #38967. * src/base/ftcalc.c (FT_DivFix) [FT_LONG64]: Fix cast.
Werner Lemberg d51ac9c7 2013-05-12T06:00:27 Fix Savannah bug #38968. * include/freetype/ftmodapi.h: Add `FT_EXPORT' to FT_Property_{Set,Get}. * src/base/ftobjs.c: Add `FT_EXPORT_DEF' to FT_Property_{Set,Get}.
Werner Lemberg ea2b4756 2013-05-10T08:04:33 [sfnt] Clean up bitmap code. * src/sfnt/ttsbit.c: Deleted. * src/sfnt/ttsbit0.c: Renamed to `ttsbit.c'. * rules.mk (SFNT_DRV_H): Updated.
Werner Lemberg f6aa089f 2013-05-10T07:58:47 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
Werner Lemberg ccbdc3c4 2013-05-08T09:17:56 * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Typo.
Werner Lemberg dd192ef0 2013-05-05T16:13:01 Fix compilation with C++. * src/base/md5.c (body): Use proper cast.
Werner Lemberg d135e27c 2013-05-05T10:44:21 Fix 64bit compilation issues. * include/freetype/config/ftconfig.h [FT_LONG64]: Typedef `FT_Int64' here. * src/base/ftcalc.c: Remove typedef of `FT_Int64'. (FT_DivFix): Fix cast. * src/base/fttrigon.c: Remove typedef of `FT_Int64'.
Werner Lemberg 073a0e29 2013-05-05T10:41:20 [raster] Fix clang issues. Fix suggested by <octoploid@yandex.com>. * src/raster/ftraster.c (ULong): New typedef. (SCALED): Add proper cast.
Werner Lemberg e6e83627 2013-05-04T18:57:56 Fix clang fixes. * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate): Use correct types. * src/cff/cf2intrp.c (cf2_interpT2CharString) <default>: Force unsigned for computations. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Ditto. * src/cff/cffparse.c (cff_parse_integer): Ditto. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
Werner Lemberg 77c39b1d 2013-05-04T18:04:07 [cff] Make Adobe CFF engine work correctly on 64bit hosts. Reported by numerous people on the `freetype-devel' list. Without this fix, glyphs aren't properly aligned on a common baseline. On 64bit systems, `FT_Pos' expands to `long int', having a width of 64bit. `CF2_Fixed' expands to `int' which is normally 32bit wide on 64bit hosts also. Wrong casts filled up the blues arrays with incorrect values. Note that all blues values are accessed with the `cf2_blueToFixed' macro which handles the 64bit to 32bit conversion. * src/cff/cf2ft.h (cf2_getBlueValues, cf2_getOtherBlues, cf2_getFamilyBlues, cf2_getFamilyOtherBlues): Use `FT_Pos' for `data', not `CF2_Fixed'. * src/cff/cf2ft.c (cf2_getBlueValues, cf2_getOtherBlues, cf2_getFamilyBlues, cf2_getFamilyOtherBlues): Updated. * src/cff/cf2blues.c (cf2_blues_init): Updated.
Werner Lemberg 94152819 2013-05-04T16:40:12 More fixes for clang's `sanitize' feature. * src/base/ftcalc.c (FT_DivFix): Use unsigned values for computations which use the left shift operator and convert to signed as the last step. * src/base/fttrigon.c (ft_trig_prenorm, FT_Vector_Rotate, FT_Vector_Length, FT_Vector_Polarize): Ditto. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Simplify. * src/cff/cffload.c (cff_subfont_load): Fix constant. * src/cff/cffparse.c (cff_parse_integer, cff_parse_real, do_fixed, cff_parse_fixed_dynamic): Use unsigned values for computations which use the left shift operator and convert to signed as the last step. * src/cid/cidload.c (cid_get_offset): Ditto. * src/psaux/psconv.c (PS_Conv_ToFixed): Ditto. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto. * src/truetype/ttinterp.c (TT_MulFix14, TT_DotFix14): Ditto.
Werner Lemberg 138068fd 2013-05-04T15:26:24 Formatting.
Werner Lemberg afaeeee9 2013-05-04T14:05:24 Fix errors reported by clang's `sanitize' feature. * include/freetype/internal/ftstream.h: Simplify and fix integer extraction macros. (FT_INT8_, FT_BYTE_I16, FT_BYTE_I32, FT_INT8_I16, FT_INT8_I32, FT_INT8_I32, FT_INT8_U32): Removed. (FT_PEEK_SHORT, FT_PEEK_LONG, FT_PEEK_OFF3, FT_PEEK_SHORT_LE, FT_PEEK_LONG_LE, FT_PEEK_OFF3_LE): Use unsigned values for computations and convert to signed as the last step. * src/cff/cf2fixed.h (cf2_intToFixed, cf2_fixedToInt, cf2_fracToFixed): Avoid shifts of negative values. (cf2_intToFrac, cf2_fixedToFrac, cf2_fixedTo26Dot6): Removed, unused. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdEXTENDEDNMBR, default>: Use unsigned values for computations and convert to signed as the last step. Use proper types in tracing messages. * src/cff/cffgload.c (cff_decoder_parse_charstrings): Use unsigned values for computation of operands and convert to signed as the last step. Use proper type in tracing message.
Werner Lemberg 99033fef 2013-05-03T17:39:24 * src/cff/cf2blues.c: Remove dead code.
Chris Liddell 9bf75e08 2013-05-02T11:09:15 * src/cff/cffgload.c: Include FT_CFF_DRIVER_H.
Werner Lemberg 06474c3e 2013-04-13T18:53:28 [cff] Add a new Type 2 interpreter and hinter. This work, written by Dave Arnold <darnold@adobe.com> and fully integrated into FreeType by me, is a donation by Adobe in collaboration with Google. It is vastly superior to the old CFF engine, and it will replace it soon. Right now, it is still off by default, and you have to explicitly select it using the new `hinting-engine' property of the cff driver. For convenience, (most of) the new files are committed separately. * include/freetype/config/ftheader.h (FT_CFF_DRIVER_H): New macro. * include/freetype/ftcffdrv.h: New file to access CFF driver properties. * include/freetype/fterrdef.h (FT_Err_Glyph_Too_Big): New error code. * include/freetype/internal/fttrace.h: Add `cf2blues', `cf2hints', and `cf2interp'. * src/cff/cffgload.h (CFF_SubFont): New member `current_subfont'. * src/cff/cffobjs.h (CFF_DriverRec): New members `hinting_engine' and `no_stem_darkening'. * src/cff/cfftypes.h (CFF_FontRec): New member `cf2_instance'. * src/cff/cff.c: Include new files. * src/cff/cffdrivr.c (cff_property_set, cff_property_get): Handle `hinting-engine' and `no-stem-darkening' properties (only the Adobe engine listens to them). * src/cff/cffgload.c: Include `cf2ft.h'. (cff_decoder_prepare): Initialize `current_subfont'. (cff_build_add_point): Handle Adobe engine which uses 16.16 coordinates. (cff_slot_load): Handle FT_LOAD_NO_SCALE and FT_LOAD_NO_HINTING separately. Choose rendering engine based on `hinting_engine' property. * src/cff/cffload.c (cff_font_done): Call finalizer of the Adobe engine. * src/cff/cffobjs.c: Include FT_CFF_DRIVER_H. (cff_driver_init): Set default property values. * src/cff/rules.mk (CFF_DRV_SRC, CFF_DRV_H): Add new files. * src/cff/cf2*.*: New files, containing the Adobe engine.
Werner Lemberg 283c8ed8 2013-04-13T15:02:31 [cff] New files for Adobe's Type 2 interpreter and hinting engine.
Werner Lemberg 831dac88 2013-04-12T21:13:49 [cff] Minor code administration issues. * src/cff/cffgload.c (check_points): Rename to... (cff_check_points): ...this and make it FT_LOCAL. (cff_builder_add_point, cff_builder_add_point1, cff_builder_start_point, cff_builder_close_contour, cff_lookup_glyph_by_stdcharcode, cff_get_glyph_data, cff_free_glyph_data): Make them FT_LOCAL. * src/cff/cffgload.h: Updated.
Werner Lemberg 2dc26621 2013-04-12T20:11:38 Add output bitmap checksums. Use `FT2_DEBUG=bitmap:3' for tracing. * src/base/md5.c, src/base/md5.h: New files, taken from http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 * include/freetype/internal/fttrace.h: Add `bitmap'. * src/base/ftobjs.c [FT_DEBUG_LEVEL_TRACE]: Include `md5.c' (FT_Render_Glyph_Internal) [FT_DEBUG_LEVEL_TRACE]: For tracing, convert resulting bitmap to a uniform format and compute a checksum. Use `bitmap' category for the tracing message. * src/base/rules.mk (BASE_H): Updated. * docs/LICENSE.TXT: Updated.
Werner Lemberg fc185ef4 2013-04-12T19:48:06 Add framework for CFF properties. * include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC7): New macro. * src/cff/cffdrivr.c: Include FT_SERVICE_PROPERTIES_H. (cff_property_set, cff_property_get): New function, still empty. Define `cff_service_properties' service. Update `cff_services'. * src/cff/cffpic.h: Include FT_SERVICE_PROPERTIES_H. (CFF_SERVICE_PROPERTIES_GET): New macro. CffModulePIC: Add `cff_service_properties'.
Werner Lemberg 04e547bd 2013-04-03T07:37:56 Fix Savannah bug #38589. * src/bdf/bdflib.c (_bdf_readstream): Thinko.
Werner Lemberg 762bf19a 2013-03-24T08:37:12 Typo.
Werner Lemberg eed83061 2013-03-23T14:25:43 Whitespace.
Werner Lemberg fbb0773c 2013-03-23T14:06:54 [autofit] Minor. * src/autofit/afmodule.c (af_property_set): Typo. (af_autofitter_init, af_autofitter_done): Use cast.
Werner Lemberg b114b7c0 2013-03-17T22:42:07 Fix Savannah bug #38538. * builds/amiga/src/base/ftdebug.c, builds/win32/ftdebug.c, builds/wince/ftdebug.c (FT_Throw): Add function.
Werner Lemberg 5ea06ce0 2013-03-17T08:14:46 Whitespace.
Werner Lemberg 706fc833 2013-03-17T08:09:17 Remove dead code. * src/raster/rastpic.c (ft_raster1_renderer_class_pic_init) src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init): Do it.
Werner Lemberg 8b4459b8 2013-03-17T07:44:35 * src/pshinter/pshpic.h (GET_PIC): Use correct container.
Werner Lemberg 89f50647 2013-03-14T17:50:49 */*: Use FT_ERR_EQ, FT_ERR_NEQ, and FT_ERR where appropriate. FT_Err_XXX and friends are no longer directly used in the source code.
Werner Lemberg e3c93015 2013-03-14T11:21:17 */*: Use FT_Err_Ok only. This is a purely mechanical conversion.
Werner Lemberg 059bc335 2013-03-14T10:27:35 */*: Use `FT_THROW'. This is essentially a mechanical conversion, adding inclusion of `FT_INTERNAL_DEBUG_H' where necessary, and providing the macros for stand-alone compiling modes of the rasterizer modules. To convert the remaining occurrences of FT_Err_XXX and friends it is necessary to rewrite the code. Note, however, that it doesn't harm if some cases are not handled since FT_THROW is a no-op.
Werner Lemberg c58ce3be 2013-03-13T11:06:39 Introduce `FT_THROW' macro. The idea is to replace code like return FT_Err_Foo_Bar; or return CFF_Err_Foo_Bar; with return FT_THROW( Foo_Bar ); The FT_THROW macro has two functions: . It hides the module specific prefix. . In debug mode, it calls the empty function `FT_Throw' which can be thus used to set a breakpoint. * include/freetype/internal/ftdebug.h (FT_THROW): New macro. (FT_Throw): New prototype. * src/base/ftdebug.c (FT_Throw): New function.
Werner Lemberg dbc6e3f1 2013-03-12T11:42:20 Remove `FT_KEEP_ERR_PREFIX'. The idea is to always have FT_ERR_PREFIX available internally. * include/freetype/fterrors.h: Use FT2_BUILD_LIBRARY to guard undefinition of FT_ERR_PREFIX * src/gxvalid/gxverror.h, src/otvalid/otverror.h, src/sfnt/sferrors.h: Updated.
Werner Lemberg c879f245 2013-03-11T10:11:57 [gxvalid] Fix module error. * src/gxvalid/gxverror.h (FT_ERR_BASE): Define as FT_Mod_Err_GXvalid. * include/freetype/ftmoderr.h: Add module error for `GXvalid'.
Werner Lemberg d6bc524b 2013-03-11T09:50:53 Always use module related error codes. * src/cff/cffobjs.c (cff_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Use `FT_ERROR_BASE'. * src/type1/t1load.c (parse_encoding): Use T1_Err_Unknown_File_Format.
Werner Lemberg 2d882540 2013-03-08T21:23:45 [cff] Set `linear{Hori,Vert}Advance' for embedded bitmaps also. * src/cff/cffgload.c (cff_slot_load): Implement it.
Alexei Podtelezhnikov 2ba18ba1 2013-02-22T23:58:57 [base] Fix commit ab02d9e8. * src/base/ftbbox.c (BBox_Cubic_Check): Change scaling to msb of 22.
Alexei Podtelezhnikov f9434dba 2013-02-19T21:27:18 [base] New bisecting BBox_Cubic_Check (disabled). * src/base/ftbbox.c (BBox_Cubic_Check): New bisecting algorithm for extremum search built around simple condition that defines which half contains the extremum.
Alexei Podtelezhnikov 0e536676 2013-02-18T20:41:56 [tools] Update BBox testing tool. * src/tools/test_bbox.c: Add another cubic outline with exact BBox. (REPEAT): Increase the number of benchmarking cycles. (profile_outline): Tweak output formatting.
Werner Lemberg a2c7eb18 2013-02-07T19:49:12 * src/truetype/ttobjs.c (tt_size_run_prep): Reset more GS variables. BTW, Greg agrees that the OpenType specification is missing the list of GS variables which will always be reset to the default values after the `prep' table has been executed.
Werner Lemberg bfcc375b 2013-02-06T08:47:29 * src/truetype/ttobjs.c (tt_size_run_prep): Reset reference points. Up to now, we simply took a snapshot of the Graphics State after the `prep' table has been executed, and right before a glyph's bytecode was run it got reloaded. However, as Greg Hitchcock has told us in private communication, reference points get reset to zero in the MS rasterizer and we follow in due course. While reasonable, this is undocumented behaviour. Most notably, this fixes the rendering of Arial's `x' glyph in subpixel hinting mode.
Werner Lemberg 00dfa330 2013-02-05T19:23:16 [truetype] A better fix for Savannah bug #38211. * src/truetype/ttinterp.c (Ins_IP): Implement identical behaviour to MS rasterizer if rp1 == rp2 (confirmed by Greg Hitchcock).
Alexei Podtelezhnikov 0eb6316f 2013-02-01T20:24:00 [pcf] Streamline parsing of PCF encoding table. * src/pcf/pcfread.c (pcf_get_encodings): Use simpler double for-loop. Reallocate array instead of using temporary storage.
Werner Lemberg 30f1e6ca 2013-02-01T14:50:08 Fix Savannah bug #38221. This complements commit 83c0ebab. * src/base/ftcalc.c (FT_MulDiv_No_Round): Don't enclose with `TT_USE_BYTECODE_INTERPRETER'.
Werner Lemberg 40633205 2013-02-01T12:55:44 [truetype] Fix Savannah bug #38211. * src/truetype/ttinterp.c (Ins_IP): Make FreeType behave identical to other interpreters if rp1 == rp2 (which is invalid).
Alexei Podtelezhnikov fba917d0 2013-01-30T20:14:18 Improve comments.
Alexei Podtelezhnikov d56e544d 2013-01-28T22:29:51 Add an important comment. Thanks to Hin-Tak Leung for the analysis.
Werner Lemberg 6b9034f0 2013-01-28T13:56:23 Formatting, comment improvements.
Alexei Podtelezhnikov ab02d9e8 2013-01-28T06:35:19 [base] Small optimization of BBox calculation. * src/base/ftbbox.c (BBox_Cubic_Check): Use FT_MSB function in scaling algorithm.
Infinality c574d72c 2013-01-26T17:40:44 [truetype] Minor formatting fix.
Infinality 97ba5109 2013-01-26T17:05:40 [truetype] Fix rasterizer_version logic in sph.
Infinality a5fe3595 2013-01-26T12:29:52 [truetype] Align more to ClearType whitepaper for sph.
Alexei Podtelezhnikov 610ee58e 2013-01-25T23:33:00 [base] Fix broken emboldening at small sizes. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Do not attempt to normalize zero-length vectors.
Werner Lemberg f41ee054 2013-01-25T16:41:24 Fix Savannah bug #38167. This fixes commit 83c0ebab from 2012-06-27. * src/truetype/ttinterp.h: s/TT_CONFIG_OPTION_BYTECODE_INTERPRETER/TT_USE_BYTECODE_INTERPRETER/.
Xi Wang ba931be2 2013-01-25T00:57:09 [sfnt] Fix broken pointer overflow checks. Many compilers such as gcc and clang optimize away pointer overflow checks `p + n < p', because pointer overflow is undefined behavior. Use a safe form `n > p_limit - p' instead. Also avoid possible integer overflow issues, for example, using `num_glyphs > ( p_limit - p ) / 2' rather than `num_glyphs * 2' given a large `num_glyphs'. * src/sfnt/ttsbit0.c (tt_sbit_decoder_load_image): Implement it.