src


Log

Author Commit Date CI Message
Werner Lemberg 5c4a23a4 2013-08-25T19:29:07 [autofit] Typo. * src/autofit/afblue.hin, src/autofit/afblue.c (GET_UTF8_CHAR): Use cast.
Werner Lemberg 306f8c5d 2013-08-25T13:07:08 [autofit] Synchronize `cjk' with `latin' module (and vice versa). * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Add tracing messages. (af_cjk_metrics_init_blues): Don't pass blue string array as argument but use the global array directly. Use `outline' directly. Update and add tracing messages. (af_cjk_metrics_init): Simplify code. (af_cjk_metrics_scale_dim): Improve tracing message. (af_cjk_metrics_scale): Synchronize. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues): Improve and add tracing messages.
Werner Lemberg 0975d685 2013-08-25T08:37:47 [autofit] Make `latin' module use blue stringsets. * src/autofit/aflatin.c (AF_LATIN_MAX_TEST_CHARACTERS): Removed. (af_latin_blue_chars): Removed. (af_latin_metrics_init_blues): Replace AF_LATIN_MAX_TEST_CHARACTERS with AF_BLUE_STRING_MAX_LEN. Change loops to use offsets (in file `afblue.h') into the new arrays `af_blue_stringsets' and `af_blue_strings' (in file `afblue.c'). Use `AF_LATIN_IS_SMALL_TOP_BLUE' macro. * src/autofit/aflatin.h: Remove old enumeration values superseded by the new data in `afblue.h'. (AF_LATIN_IS_TOP_BLUE): Updated definition. (AF_LATIN_IS_SMALL_TOP_BLUE): New macro. (AF_LATIN_MAX_BLUES): Remove. (AF_LatinAxisRec): Updated.
Werner Lemberg db3e5b93 2013-08-25T08:23:22 [autofit] Add blue stringsets. * src/autofit/aftypes.h: Include `afblue.h'. (AF_ScriptClassRec): Add `blue_stringset' field. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/autofit.c: Include `afblue.c'. * src/autofit/afcjk.c (af_hani_script_class), src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c (af_deva_script_class), src/autofit/aflatin.c (af_latn_script_class), src/autofit/aflatin2.c (af_ltn2_script_class): Updated. * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afblue.c'.
Werner Lemberg 8b8be783 2013-08-25T08:01:41 [autofit] Introduce data file for blue strings. The idea is to have a central file which gets processed by a Perl script to create proper `.c' and `.h' files using templates. There are two other reasons to do that: . The data file should be easily readable. We use UTF-8 encoding which then gets converted to single bytes. . Since the number of supported scripts will increase soon, the current usage of blue string arrays is a waste of space. Using the Perl script it is possible to imitate jagged arrays, defining enumeration constants as offsets into the arrays. This commit only adds files without changing any functionality. * src/autofit/afblue.dat: New data file. * src/tools/afblue.pl: New Perl script for processing `afblue.dat'. * src/autofit/afblue.cin, src/autofit/afblue.hin: New template files for... * src/autofit/afblue.c, src/autofit/afblue.c: New source files. To avoid a dependency on Perl, we add them too.
Alexei Podtelezhnikov fc32e1c8 2013-08-19T22:57:05 [base] Enable new algorithm for BBox_Cubic_Check. * src/base/ftbbox.c: Enable new BBox_Cubic_Check algorithm, remove the old one. Improve comments.
Alexei Podtelezhnikov 32a7d870 2013-08-17T22:19:21 [base] Clean up BBox_Conic_Check. * src/base/ftbbox.c (BBox_Conic_Check): Remove redundant checks for extremum at the segment ends, which are already within the bbox. Slightly modify calculations.
Alexei Podtelezhnikov 1a9c3d14 2013-08-15T22:51:42 [base] Finish experimental (disabled) BBox_Cubic_Check implementation. * src/base/ftbbox.c (BBox_Cubic_Check): Scale arguments to improve accuracy and avoid overflows.
Alexei Podtelezhnikov 61a65510 2013-08-13T22:28:57 [base] Refactor experimental (disabled) BBox_Cubic_Check. * src/base/ftbbox.c (BBox_Cubic_Check): Implement the minimum search as the mirror image of the maximum search.
John Tytgat 9bcfab87 2013-08-06T08:55:19 Fix Savannah bug #39702. * src/cff/cffload.c (cff_index_get_pointers): Check for `cur_offset != 0'; this stronger test is mandated by the CFF specification. Fix test for INDEX structures which have one or more empty entries at the end.
Werner Lemberg a32682f1 2013-08-06T00:21:46 Fix gcc pragmas, part 2. * src/truetype/ttinterp.c (TT_MulFix14_long_long, TT_DotFix14_long_long): `#pragma gcc diagnostic {push,pop}' has been introduced with gcc version 4.6.
Werner Lemberg 69e524d5 2013-08-05T23:38:32 Fix gcc pragmas. * src/truetype/ttinterp.c (TT_MulFix14_long_long, TT_DotFix14_long_long): Older gcc versions don't accept diagnostic pragmas within a function body.
Werner Lemberg df41fe57 2013-08-05T16:34:32 Whitespace.
Werner Lemberg cc25e3ae 2013-08-05T08:46:15 [autofit] Improve handling of `near' points. Points which are very near to each other are now marked as such. The `weak' flag is then computed by using the `in' vector of the first and the `out' vector of the last point of a group of near points. For example, this fixes the rendering of glyph `Oslash' in `Roboto-Thin.ttf'. * src/autofit/afhints.h (AF_Flags): New value `AF_FLAGS_NEAR'. * src/autofit/afhints.c (af_glyph_hints_reload): Introduce the heuristic value `near_limit' to decide whether the current point is near to the previous one, then set `AF_FLAG_NEAR' accordingly. Store good `in' vector (of last non-near point) in `last_good_in_{x,y}' and use it as an argument to `ft_corner_is_flat' if necessary.
Werner Lemberg ba9cf52d 2013-08-05T07:00:59 Comment typo.
Werner Lemberg fb09a51f 2013-08-04T18:24:02 Add comments to `ft_corner_is_flat'.
Werner Lemberg b8bf8b54 2013-08-04T09:25:24 [autofit] Update comments.
Werner Lemberg 6d3c10e0 2013-08-02T20:47:15 Typo.
Werner Lemberg 456cc440 2013-08-02T20:25:21 [autofit] Move declaration of scripts into separate file. This has the benefit that we don't need to duplicate the data at different places. * src/autofit/afscript.h: New file. * src/autofit/aftypes.h (AF_Script): Include `afscript.h' to define the enumeration values. * src/autofit/afglobal.c: Include `afscript.h' to get the script specific header files. (af_script_classes): Include `afscript.h' to fill this array. * src/autofit/afpic.c: Include `afscript.h' to get the script specific header files. (autofit_module_class_pic_init): Include `afscript.h' for initialization. * src/autofit/afpic.h (AF_SCRIPT_CLASSES_COUNT, AF_SCRIPT_CLASSES_REC_COUNT): Removed. Use `AF_SCRIPT_MAX' instead. * src/autofit/rules.mk (AUTOF_DRV_H): Updated.
Werner Lemberg 773601da 2013-08-02T19:51:17 [autofit] Move declaration of writing systems into separate file. This has the benefit that we don't need to duplicate the data at different places. * src/autofit/afwrtsys.h: New file. * src/autofit/aftypes.h (AF_WritingSystem): Include `afwrtsys.h' to define the enumeration values. * src/autofit/afglobal.c: Include `afwrtsys.h' to get the writing system specific header files. Include `afpic.h'. (af_writing_system_classes): Include `afwrtsys.h' to fill this array. * src/autofit/afpic.c: Include `afwrtsys.h' to get the writing system specific header files. (autofit_module_class_pic_init): Include `afwrtsys.h' for initialization. * src/autofit/afpic.h (AF_WRITING_SYSTEM_CLASSES_COUNT, AF_WRITING_SYSTEM_CLASSES_REC_COUNT): Removed. Use `AF_WRITING_SYSTEM_MAX' instead.
Werner Lemberg 74a9b670 2013-08-02T14:53:32 [sfnt] Fix compilation with g++. * src/sfnt/pngshim.c (error_callback, read_data_from_FT_stream): Use cast. (Load_SBit_Png): Pacify compiler.
Werner Lemberg 89a529f3 2013-08-02T14:50:23 [autofit] Fix `make multi'. * include/freetype/config/ftconfig.h (FT_LOCAL_ARRAY, FT_LOCAL_ARRAY_DEF): New macros. * src/autofit/afglobal.c (af_writing_system_classes, af_script_classes): Use FT_LOCAL_ARRAY_DEF. * src/autofit/afglobal.h: Declare `af_writing_system_classes' and `af_script_classes'. * src/autofit/afloader.c: Include `afpic.h'.
Werner Lemberg e8ed2d62 2013-08-01T12:20:20 Another round of cppcheck nitpicks. The call was (from the top-level of the FreeType tree): cppcheck --force \ --enable=all \ -I /usr/include \ -I /usr/local/include \ -I /usr/lib/gcc/i586-suse-linux/4.7/include \ -I include \ -I include/freetype \ -I include/freetype/config \ -I include/freetype/internal \ -DFT2_BUILD_LIBRARY \ . &> cppcheck.log using cppcheck git commit f7e93f99. Note that cppcheck still can't handle `#include FOO' (with `FOO' a macro). */* Improve variable scopes. */* Remove redundant initializations which get overwritten. * src/gxvalid/*: Comment out redundant code or guard it with FT_DEBUG_LEVEL_TRACE.
Werner Lemberg 72f5ff5b 2013-07-31T22:49:29 [autofit] Introduce `writing systems'. This patch adds a new top level to the auto-hinter's script class hierarchy. It defines `writing systems' which can contain multiple scripts. For example, the `latin' writing system (in file `aflatin.c') is able to support scripts like Latin, Cyrillic, Armenian, etc., which can be handled similarly. Scripts are now named using four-letter OpenType tags. * src/autofit/aftypes.h (AF_ScriptClassRec): Move relevant members to... (AF_WritingSystemClassRec): This new structure. It holds pointers to functions which can be shared among related scripts. (AF_WritingSystem): New enumeration. (AF_Script): Revised values using four-letter tags. (AF_DEFINE_WRITING_SYSTEM_CLASS): New macro. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/afglobal.c (af_writing_system_classes): New global, constant array. (af_script_classes): Updated. (af_face_globals_free): Updated. Remove assertion. (af_face_globals_get_metrics): Updated. * src/autofit/afglobal.h (AF_SCRIPT_FALLBACK) [!AF_CONFIG_OPTION_CJK]: Handle this case. * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): Updated. * src/autofit/afpic.c (autofit_module_class_pic_init): Updated; initialize structures for both writing systems and scripts. * src/autofit/afpic.h: Updated. (AF_WRITING_SYSTEM_CLASSES_GET): New macro. * src/autofit/afcjk.c (af_cjk_writing_system_class): New writing system. (af_cjk_uniranges): Renamed to... (af_hani_uniranges): This. (af_cjk_script_class): Reduced and renamed to... (af_hani_script_class): This. * src/autofit/afcjk.h: Updated. * src/autofit/afdummy.c (af_dummy_writing_system_class): New writing system. (af_dummy_script_class): Reduced and renamed to... (af_dflt_script_class): This. * src/autofit/afdummy.h: Updated. * src/autofit/afindic.c (af_indic_writing_system_class): New writing system. (af_indic_uniranges): Renamed to... (af_deva_uniranges): This. (af_indic_script_class): Reduced and renamed to... (af_deva_script_class): This. * src/autofit/afcjk.h: Updated. * src/autofit/aflatin.c (af_latin_writing_system_class): New writing system. (af_latin_uniranges): Renamed to... (af_latn_uniranges): This. (af_latin_script_class): Reduced and renamed to... (af_latn_script_class): This. * src/autofit/aflatin.h: Updated. * src/autofit/aflatin2.c (af_latin2_writing_system_class): New writing system. (af_latin2_uniranges): Renamed to... (af_ltn2_uniranges): This. Synchronize ranges with `latin'. (af_latin2_script_class): Reduced and renamed to... (af_ltn2_script_class): This. * src/autofit/aflatin2.h: Updated.
Werner Lemberg 5d6a3605 2013-07-30T23:17:04 [autofit] Variable renaming. * src/autofit/aftypes.h (AF_ScriptMetricsRec): s/clazz/script_class/. Update all users.
Werner Lemberg cc34efca 2013-07-31T22:55:50 Minor.
suzuki toshiya f2e7f1e1 2013-07-30T13:32:57 2013-07-30 Behdad Esfahbod <behdad@google.com> Prevent division by zero by a transparent color. * src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Return 0 immediately, when alpha channel is zero.
Behdad Esfahbod 21c32b08 2013-07-25T21:53:18 Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR. Also disambiguate Google's color bitmap tables. * include/freetype/freetype.h (FT_FACE_FLAG_COLOR, FT_HAS_COLOR): New macros. * include/freetype/internal/tttypes.h (TT_SbitTableType): Add TT_SBIT_TABLE_TYPE_CBLC. * src/sfnt/sfobjs.c (sfnt_load_face): Handle FT_FACE_FLAG_COLOR. * src/sfnt/ttsbit.c (tt_face_load_sbit, tt_face_load_strike_metrics, tt_face_load_sbit_image): Handle TT_SBIT_TABLE_TYPE_CBLC.
suzuki toshiya b4725cb7 2013-07-24T14:25:39 [sfnt] Fix for `make multi' target. * src/sfnt/pngshim.c (Load_SBit_Png): Use FT_LOCAL_DEF().
Behdad Esfahbod ff269528 2013-07-20T08:02:39 [sfnt] Fix `sbix' table version handling. * src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]: USHORT version numbers are to be considered as `minor'.
Werner Lemberg 05c1421f 2013-07-19T23:11:23 [autofit] Fix segment classification for blue zones. The old code (essentially unchanged since the very beginning) incorrectly handled this configuration x -o- x / \ / \ / \ o o as flat and this o o / / x| x| | | o---------------o as round. (`o' and `x' are on and off points, respectively). This is a major change which should improve the rendering results enormously for many TrueType fonts, especially in the range approx. 20-40ppem, fixing the appearance of many overshoots. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Look at the first and last points of the segment, not the points right before and after.
Behdad Esfahbod 778a7e6a 2013-07-19T14:28:28 [sfnt] `sbix' fix-ups. * src/sfnt/sfobjs.c (sfnt_load_face): Apple's `sbix' color bitmaps are rendered scaled and then the `glyf' outline rendered on top. We don't support that yet, so just ignore the `glyf' outline and advertise it as a bitmap-only font. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) [TT_SBIT_TABLE_TYPE_SBIX]: Return metrics in 26.6 units. (tt_face_load_sbix_image): Typo.
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.