src/base


Log

Author Commit Date CI Message
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 c06889eb 2013-06-12T10:58:06 More compiler warning fixes. */*: Use cast to `FT_Bool' (or `Bool') where appropriate.
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 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 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 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 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.
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.
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 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 f6aa089f 2013-05-10T07:58:47 */* [FT_CONFIG_OPTION_OLD_INTERNALS]: Remove macro and guarded code.
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 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 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 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 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 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 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.
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.
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'.
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.
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.
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 817caa9f 2013-01-25T00:40:56 Fix `make multi' * src/base/ftoutln.c, src/base/fttrigon.c: Include FT_INTERNAL_CALC_H.
Werner Lemberg 4cd5fd46 2013-01-24T13:33:06 Remove trailing whitespace.
Werner Lemberg e9f330ad 2013-01-24T09:12:56 [base] Make `FT_Hypot' really internal. * include/freetype/fttrigon.h (FT_Hypot): Move to... * include/freetype/internal/ftcalc.h: This file. * src/base/fttrigon.c (FT_Hypot): Move to... * src/base/ftcalc.c: This file. Include FT_TRIGONOMETRY_H. * src/truetype/ttgload.c: Don't include FT_TRIGONOMETRY_H.
Alexei Podtelezhnikov b6de8e66 2013-01-23T23:31:41 [base, truetype] New internal FT_Hypot function. * include/freetype/fttrigon.h (FT_Hypot): Declare it. * src/base/fttrigon.c (FT_Hypot): Define it. * src/truetype/ttgload.c (TT_Process_Composite_Component): Use it instead of explicit expressions. * src/truetype/ttinterp.c (Current_Ratio, Normalize): Use it instead of TT_VecLen. (TT_VecLen): Removed.
Alexei Podtelezhnikov dcc0d070 2013-01-23T23:09:59 Typo.
Alexei Podtelezhnikov da11e5e7 2013-01-23T20:11:40 [base] Fix integer overflow. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Normalize incoming and outgoing vectors and use fixed point arithmetic.
Alexei Podtelezhnikov e1a2ac19 2013-01-23T19:51:28 [base] Fix integer overflow. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Scale the coordinates down to avoid overflow.
Alexei Podtelezhnikov 869fb8c4 2013-01-23T19:43:28 [base] Split out MSB function. * src/base/fttrigon.c (ft_trig_prenorm): Borrow from here. * include/freetype/internal/ftcalc.h (FT_MSB): Declare here. * src/base/ftcalc.c (FT_MSB): Define here.
Werner Lemberg 71900980 2013-01-16T20:08:35 Minor.
Alexei Podtelezhnikov a692170a 2013-01-12T19:17:05 Call it fixed-point.
Werner Lemberg 53c0cb59 2013-01-11T08:29:22 Typos, whitespace.
Alexei Podtelezhnikov ad9d5c97 2013-01-10T22:29:07 [base] Update the overflow protection bit. The recent optimizations of CORDIC iterations drastically reduce the expansion factor. The vector components with MSB of 29 are now safe from overflow. * src/base/fttrigon.c (FT_TRIG_SAFE_MSB): New macro. (ft_trig_prenorm): Use it and remove dead code.
Werner Lemberg 4412e74d 2013-01-10T20:16:20 Minor comment improvements.
Alexei Podtelezhnikov 6b83a367 2013-01-09T00:25:32 [base, pshinter] Use FT_ABS, FT_MIN, and FT_MAX for readability. * src/base/ftbbox.c: Updated. * src/base/ftobjs.c: Updated. * src/base/fttrigon.c: Updated. * src/pshinter/pshalgo.c: Updated. * src/pshinter/pshrec.c: Updated.
Alexei Podtelezhnikov 09dbb059 2013-01-08T23:29:44 [base] Clean up trigonometric core. * src/base/fttrigon.c: Document the algorithm in a large comment. (FT_TRIG_COSCALE): Remove macro. (FT_Tan: Use `FT_TRIG_SCALE' instead. (FT_Cos, FT_Vector_Unit): Ditto and round the return values.
Alexei Podtelezhnikov 5dd9657f 2013-01-02T23:45:14 [base] Use rounding in CORDIC iterations. * src/base/fttrigon.c (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Improve accuracy by rounding.
Alexei Podtelezhnikov b4ac30b0 2013-01-02T22:21:37 [base] Reduce trigonometric algorithms. After we get within 45 degrees by means of true 90-degree rotations, we can remove initial 45-degree CORDIC iteration and start from atan(1/2) pseudorotation, reducing expansion factor thereby. * src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macros. (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Update. * src/tools/cordic.py: Bring up to date with trigonometric core. * docs/CHANGES: Old typo.
Werner Lemberg 3ffb822e 2012-12-21T16:45:27 Check parameters of `FT_Outline_New'. Problem reported by Robin Watts <robin.watts@artifex.com>. * src/base/ftoutln.c (FT_Outline_New_Internal): Ensure that `numContours' and `numPoints' fit into FT_Outline's `n_points' and `n_contours', respectively.
Alexei Podtelezhnikov d7383b7b 2012-12-20T01:03:22 [base] Improve trigonometric core. FreeType used to rely on a 24-step iteration CORDIC algorithm to calculate trigonometric functions and rotate vectors. It turns out that once the vector is in the right half-plane, the initial rotation by 63 degrees is not necessary. The algorithm is perfectly capable to converge to any angle starting from the second 45 degree rotation. This patch removes the first rotation and makes it a 23-step CORDIC algorithm. * src/base/fttrigon.c (FT_TRIG_SCALE, FT_TRIG_COSCALE): Update macro values. (ft_trig_pseudo_rotate, ft_trig_pseudo_polarize): Remove initial rotation.
Werner Lemberg 768590a9 2012-12-20T06:08:23 * src/base/ftobjs.c (ft_property_do): Fix compiler warning.
Alexei Podtelezhnikov 32fc416f 2012-12-19T23:05:32 * src/base/ftrfork.c (FT_Raccess_Guess): Switch to FT_Int counters.
Alexei Podtelezhnikov 06174dbb 2012-12-19T22:46:27 [base] Clean up trigonometric core. * src/base/fttrrigon.c (ft_trig_pseudo_polarize): Align algorithm with `ft_trig_pseudo_rotate'.
Alexei Podtelezhnikov 8ac5c5c8 2012-12-15T23:33:55 [base] Fix 11-year old bug. Since the initial commit (ebe85f59) the value of FT_TRIG_SCALE has always been slightly less than the correct value, which has been given in the comment as a hexadecimal. As a result, vector lengths were underestimated and rotated vectors were shortened.
Alexei Podtelezhnikov 72e976d4 2012-11-27T21:18:34 [ftstroke] Minor improvement. * src/base/ftstroke.c: Replace nested FT_DivFix and FT_MulFix with FT_MulDiv.
Werner Lemberg fa22ec1c 2012-11-17T11:45:24 * src/base/fttrigon.c (ft_trig_downscale): Make 64bit version work.
Alexei Podtelezhnikov 0690d3d7 2012-11-15T20:50:59 [base] Fix integer overflows in dd5718c7d67a. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Use FT_MulDiv.
Alexei Podtelezhnikov dd5718c7 2012-11-04T00:57:57 [base] Fortify emboldening code against egregious distortions. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Threshold emboldening strength when it leads to segment collapse.
Alexei Podtelezhnikov 48ce226a 2012-11-03T22:27:27 [base] Clean up emboldening code and improve comments there. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Replace sequential calls to FT_MulFix and FT_DivFix with FT_MulDiv. Mention that bisectors are used to figure out the shift direction.
Werner Lemberg 073a4cef 2012-09-15T09:10:06 Use `FT_Module' instead of `FT_Library' argument in property funcs. This internal change simplifies access to global module data. * include/freetype/internal/services/svprop.h (FT_Properties_SetFunc, FT_Properties_GetFunc): Change accordingly. * src/base/ftobjs.c (ft_property_do), src/autofit/afmodule.c (af_property_set, af_property_get): Updated.
Werner Lemberg 0f8fd88e 2012-08-30T23:31:55 Implement properties to control FreeType modules. * include/freetype/fterrdef.h (FT_Err_Missing_Property): New error code. * include/freetype/ftmodapi.h (FT_Property_Set, FT_Property_Get): New API. * include/freetype/internal/services/svprop.h: New file. * include/freetype/internal/ftserv.h (FT_SERVICE_PROPERTIES_H): New macro. * src/base/ftobjs.c: Include FT_SERVICE_PROPERTIES_H. (ft_property_do, FT_Property_Set, FT_Property_Get): New functions.
Werner Lemberg 328aa3b2 2012-08-27T11:23:41 [FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings. * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER), include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER, FT_DEFINE_MODULE), include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2, FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4, FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6), src/autofit/afpic.c (autofit_module_class_pic_init), src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c (ft_create_default_module_classes), src/cff/cffparse.c (FT_Create_Class_cff_field_handlers), src/cff/cffpic.c (cff_driver_class_pic_init), src/pshinter/pshpic.c (pshinter_module_class_pic_init), src/psnames/pspic.c (psnames_module_class_pic_init), src/raster/rastpic.c (ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c (sfnt_module_class_pic_init), src/sfnt/ttcmap.c (FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c (tt_driver_class_pic_init): Initialize allocation variable.
Werner Lemberg d0841ea7 2012-08-27T06:57:05 [autofit] Some macro and variable renamings for orthogonality. * include/freetype/internal/autohint.h, src/base/ftobjs.c, src/autofit/afmodule.c, src/autofit/afpic.c, src/autofit/afpic.h: s/SERVICE/INTERFACE/, s/service/interface/, s/Service/Interface/.
Werner Lemberg b355b569 2012-08-26T14:00:11 Fix Savannah bug #37178. * src/base/ftobjs.c (FT_Open_Face): Initialize `error' with `FT_Err_Missing_Module' before loop to indicate `no valid drivers'.
Werner Lemberg 68fe6a9a 2012-08-26T13:56:56 Formatting.
Werner Lemberg 04affa27 2012-08-17T09:28:28 * src/base/ftsynth.c (FT_GlyphSlot_Oblique): Fix shear angle. The old value was far too large (more than 20°). The new one corresponds to 12°, quite common in typography.
Alexei Podtelezhnikov bc5bcecf 2012-07-13T17:52:43 Revert the last commit 45337b07.
Alexei Podtelezhnikov 45337b07 2012-07-11T22:12:13 [ftstroke] Fix uninitialized return value. * src/base/ftstroke.c (FT_Stroker_New): Return FT_Err_Ok instead.
Gilles Espinasse 9123404c 2012-07-07T11:17:02 Fix strict-aliasing warning. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Avoid double cast.
Werner Lemberg b6978dd0 2012-07-06T19:38:44 [autofit] Do some code cleanup. * src/autofit/afglobal.c (af_face_globals_new): Simplify. * src/autofit/afhints.c: Use `FT_TRACE7' instead of `printf' everywhere. (FT_COMPONENT): New macro. (af_glyph_hints_done): Simplify. * include/freetype/internal/fttrace.h: Updated.
Werner Lemberg 12470965 2012-06-27T08:44:30 Fix conditional compilation. * src/base/basepic.c: Use FT_CONFIG_OPTION_MAC_FONTS.
Alexei Podtelezhnikov cea9d7a6 2012-06-15T06:33:46 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Improve spacing. * docs/CHANGES: Updated.
Alexei Podtelezhnikov 2bdd0949 2012-05-28T23:11:03 * src/base/ftoutln.c (FT_Outline_Get_Orientation): Simplify. We now use the cross product of the direction vectors to compute the outline's orientation.
Alexei Podtelezhnikov f875fc71 2012-05-28T22:34:58 New function FT_Outline_EmboldenXY. * include/freetype/ftoutln.h (FT_Outline_EmboldenXY): Define it. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Implement it, using a simplified embolding algorithm. (FT_Outline_Embolden): Make it a special case of `FT_Outline_EmboldenXY'
Werner Lemberg ba67957d 2012-03-03T12:27:18 Fix Savannah bug #35660. For some divisions, we use casts to 32bit entities. Always guard against division by zero with these casts also. * src/base/ftcalc.c (ft_div64by32): Remove redundant cast. (FT_MulDiv, FT_MulDiv_No_Round): Add 32bit cast. (FT_DivFix): Add 32bit cast (this omission triggered the bug).
Alexei Podtelezhnikov b25265c5 2012-02-29T13:45:24 Avoid modulo operators against a power-of-two denominator. * src/afcjk.c (af_hint_normal_stem), src/base/ftoutln.c (ft_contour_has), src/cff/cffgload.c (cff_decoder_parse_charstrings) <cff_op_vvcurveto, cff_op_hhcurveto, cff_op_hvcurveto>, src/gxvalid/gxvcommn.c (GXV_32BIT_ALIGNMENT_VALIDATE), src/gxvalid/gxvfeat.c (gxv_feat_setting_validate): Replace `%' with `&' operator.
Werner Lemberg f24d0793 2012-02-11T09:37:46 Clean up `generic' fields. * include/freetype/internal/ftobjs.h (FT_ModuleRec, FT_LibraryRec): Remove `generic' field since users can't access it. * src/base/ftobjs.c (FT_Done_GlyphSlot): Call `generic.finalizer' as advertised in the documentation of FT_Generic. (Destroy_Module, FT_Done_Library): Updated to changes in `ftobjs.h'.
Werner Lemberg 02c0e526 2012-02-11T08:29:47 Formatting.
suzuki toshiya c7c4d68b 2012-01-17T15:13:50 [raccess] Modify for PIC build. Based on the patch provided by Erik Dahlstrom <ed@opera.com>, http://lists.gnu.org/archive/html/freetype-devel/2012-01/msg00010.html Also `raccess_guess_table[]' and `raccess_rule_by_darwin_vfs()' are renamed with `ft_' suffixes. * src/base/ftbase.h: `raccess_rule_by_darwin_vfs()' is renamed to `ft_raccess_rule_by_darwin_vfs()'. * src/base/ftobjs.c: Ditto. * src/base/ftrfork.c: Declarations of FT_RFork_Rule, raccess_guess_rec, are moved to... * include/freetype/internal/ftrfork.h: Here. * include/freetype/internal/ftrfork.h: FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END} macros are defined to replace raccess_guess_table[] in both of PIC and non-PIC modes. * src/base/ftrfork.c: raccess_guess_table[] array is rewritten by FT_RFORK_RULE_ARRAY_{BEGIN,ENTRY,END}. * src/base/basepic.h (BasePIC): Add `ft_raccess_guess_table' storage. (FT_RACCESS_GUESS_TABLE_GET): New macro to retrieve the function pointer from `ft_raccess_guess_table' storage in `BasePIC' structure. * src/base/ftrfork.c (FT_Raccess_Guess): Rewritten with FT_RACCESS_GUESS_TABLE_GET. (raccess_get_rule_type_from_rule_index): Add `library' as the first argument to the function, to retrieve the storage of `ft_raccess_guess_table' from it. Also `raccess_guess_table' is replaced by FT_RACCESS_GUESS_TABLE_GET. (ft_raccess_rule_by_darwin_vfs): Ditto.
suzuki toshiya 1749d8bc 2012-01-17T02:00:24 Remove trailing spaces.
suzuki toshiya c24f77ac 2012-01-16T21:13:05 Formatting PIC related sources. * src/autofit/afpic.c: Harmonize to FT2 coding conventions. * src/base/basepic.c: Ditto. * src/base/ftpic.c: Ditto. * src/cff/cffpic.c: Ditto. * src/pshinter/pshpic.c: Ditto. * src/psnames/pspic.c: Ditto. * src/raster/rastpic.c: Ditto. * src/sfnt/sfntpic.c: Ditto. * src/smooth/ftspic.c: Ditto. * src/truetype/ttpic.c: Ditto.
suzuki toshiya 3c966818 2012-01-15T23:35:31 Fix redundant declaration warning in PIC mode. Originally FT_DEFINE_{DRIVER,MODULE,RENDERER}() macros were designed to declare xxx_pic_{free,init} by themselves. Because these macros are used at the end of the module interface (e.g. ttdriver.c) and the wrapper source to build a module as a single object (e.g. truetype.c) includes the PIC file (e.g. ttpic.c) before the module interface, these macros are expanded AFTER xxx_pic_{free,init} body when the modules are built as single object. The declaration after the implementation causes the redundant declaration warnings, so the declarations are moved to module PIC headers (e.g. ttpic.h). Separating to other header files are needed for multi build. * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER): Remove class_##_pic_free and class_##_pic_init declarations. * include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER, FT_DEFINE_MODULE): Ditto. * src/base/basepic.h: Insert a comment and fix coding style. * src/autofit/afpic.h: Declare autofit_module_class_pic_{free, init}. * src/cff/cffpic.h: Declare cff_driver_class_pic_{free,init}. * src/pshinter/pshpic.h: Declare pshinter_module_class_pic_{free, init}. * src/psnames/pspic.h: Declare psnames_module_class_pic_{free, init}. * src/raster/rastpic.h: Declare ft_raster{1,5}_renderer_class_pic_{free,init} * src/sfnt/sfntpic.h: Declare sfnt_module_class_pic_{free,init}. * src/smooth/ftspic.h: Declare ft_smooth_{,lcd_,lcdv_}renderer_class_pic_{free,init}. * src/truetype/ttpic.h: Declare tt_driver_class_pic_{free,init}.
suzuki toshiya 09f3e41c 2012-01-15T02:48:47 [base] Fix a dereference of uninitialized variable in PIC mode. * src/base/ftglyph.c (FT_Glyph_To_Bitmap): `glyph' must be set before derefering to obtain `library'. The initialization of `clazz', `glyph', `library' and NULL pointer check are reordered to minimize PIC conditonals.
suzuki toshiya 0614febc 2012-01-15T01:29:41 [base] Insert explict cast for GCC 4.6 in PIC mode. * src/base/ftinit.c (FT_Add_Default_Modules): Under PIC configuration, FT_DEFAULT_MODULES_GET returns FT_Module_Class** pointer, GCC 4.6 warns that const FT_Module_Class* const* variable is warned as inappropriate to store it. To calm it, explicit cast is inserted. Also `library' is checked to prevent the NULL pointer dereference in FT_DEFAULT_MODULES_GET.
Werner Lemberg 2fb22d56 2011-12-08T11:55:06 Fix serious scaling bug in `FT_Get_Advances'. * src/base/ftadvanc.c (FT_Get_Advances): Advance values returned by `FT_Load_Glyph' must be simply multiplied by 1024.
suzuki toshiya 714ee56a 2011-12-02T21:14:18 [mac] Unify DARWIN_NO_CARBON with FT_MACINTOSH. Originally FT_MACINTOSH was a pure auto macro and DARWIN_NO_CARBON was a configurable macro to disable Carbon-dependent code. Because now configure script sets DARWIN_NO_CARBON by default and disables Darwin & Carbon-dependent codes, these macros can be unified. FT_MACINTOSH (undefined by default) is kept and DARWIN_NO_CARBON (defined by default) is removed, because DARWIN_NO_CARBON violates FT_XXX naming convention of public macros, and a macro configured by default is not portable for the building without configure (e.g. make devel). * builds/unix/configure.raw: Define FT_MACINTOSH if Carbon-based old Mac font support is requested and Carbon is available. * builds/unix/ftconfig.in: Undefine FT_MACINTOSH when the support for Mac OS X without Carbon (e.g. Mac OS X 10.4 for ppc64) is requested. * include/freetype/config/ftconfig.in: Ditto. * builds/vms/ftconfig.h: Ditto. * src/base/ftbase.h: Remove DARWIN_NO_CARBON. * src/base/ftbase.c: Ditto. * src/base/ftobjs.c: Ditto. * src/base/ftrfork.c: Ditto. * src/base/ftmac.c: Compile the body if FT_MACINTOSH is defined (same with TT_USE_BYTECODE_INTERPRETER in ttinterp.c). * builds/mac/ftmac.c: Ditto. * builds/mac/FreeType.m68k_cfm.make.txt: Define FT_MACINTOSH. * builds/mac/FreeType.m68k_far.make.txt: Ditto. * builds/mac/FreeType.ppc_classic.make.txt: Ditto. * builds/mac/FreeType.ppc_carbon.make.txt: Ditto.
Werner Lemberg dfb475ab 2011-11-14T20:29:13 Fix compiler warning.
Chris Liddell 8b90cf0b 2011-11-13T16:30:59 Add FT_Get_PS_Font_Value() API. This allows a Type 1 font face to be interrogated to retrieve most of the dictionary keys (keys not relevant to FreeType's Type 1 interpreter are not available). * include/freetype/internal/services/svpsinfo.h (PS_GetFontValueFunc): New typedef. (PSInfo): Add `ps_get_font_value'. (FT_DEFINE_SERVICE_PSINFOREC): Updated. * include/freetype/internal/t1types.h (T1_EncodingType): Moved to... * include/freetype/t1tables.h: Here. (PS_Dict_Keys): New enumeration. (FT_Get_PS_Font_Value): New declaration. * src/base/fttype1.c (FT_Get_PS_Font_Value): New function. * src/type1/t1driver.c (t1_ps_get_font_value): This new function does the real job. (t1_service_ps_info): Add it. * src/cff/cffdrivr.c (cff_service_ps_info), src/cid/cidriver.c (cid_service_ps_info), src/type42/t42drivr.c (t42_service_ps_info): Updated.
suzuki toshiya 94ada3d8 2011-10-30T14:03:13 [raccess] Supplement for previous fix. * src/base/ftbase.h (raccess_rule_by_darwin_vfs): Do not declare it on native Mac OS X. * src/base/ftrfork.c (raccess_get_rule_type_from_rule_index): Hide raccess_get_rule_type_from_rule_index() on native Mac OS X too.
suzuki toshiya dbe330bc 2011-10-30T12:31:03 [raccess] Hide raccess_rule_by_darwin_vfs() on native Mac OS X. * src/base/ftrfork.c (raccess_rule_by_darwin_vfs): Do not compile on native Mac OS X because it is not used.
Kal Conley 72185cb5 2011-10-15T09:33:11 Fix handling of transformations if no renderer is present. * src/base/ftobjs.c (FT_Load_Glyph): Thinko.
Kal Conley 298608d1 2011-10-15T09:09:59 Fix conditions for autohinting. * src/base/ftobjs.c (FT_Load_Glyph): Handle FT_LOAD_IGNORE_TRANSFORM.
Werner Lemberg 9c98fbf6 2011-10-01T09:25:55 Handle some border cases. * include/freetype/config/ftstdlib.h (FT_USHORT_MAX): New macro. * src/base/ftbitmap.c (FT_Bitmap_Convert): Protect against invalid value of `target->rows'. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add check for flex start. * src/raster/ftrend1.c (ft_raster1_render): Check `width' and `height'. * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Protect against invalid values in `localpoints' array.
Werner Lemberg 57b6a614 2011-09-09T19:05:54 Better tracing of metrics. * src/base/ftobjs.c (FT_Request_Size, FT_Select_Size): Decorate with FT_TRACE.
Werner Lemberg c9a69022 2011-08-30T08:09:38 Typo.
Werner Lemberg 51ca771f 2011-08-30T07:42:19 Better tracing of metrics. * src/base/ftobjs.c (FT_Select_Metrics, FT_Request_Metrics): Decorate with FT_TRACE.
David Bevan 864c426e 2011-08-15T17:34:01 Fix Savannah bug #33992. * src/base/ftstroke.c (FT_Stroker_ParseOutline): Fix border case.