Log

Author Commit Date CI Message
Werner Lemberg db9159c4 2013-10-22T10:27:50 Add md5 URL.
Werner Lemberg 604838d5 2013-10-22T01:10:10 * src/base/md5.c, src/base/md5.h: Updated to recent version. * src/base/ftobjs.c: Updated; `md5.c' no longer uses `free'.
Werner Lemberg 75efc2d0 2013-10-19T21:46:03 [autofit] s/SMALL_TOP/X_HEIGHT/. * src/autofit/afblue.dat: Updated. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.c, src/autofit/aflatin.h, src/autofit/atlatin2.c: Updated.
Werner Lemberg 34efe05c 2013-10-19T21:14:40 * src/autofit/afblue.dat: s/MINOR/DESCENDER/. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
Werner Lemberg a5f22a9e 2013-10-17T11:08:25 [autofit] Add description strings to script entries. Currently, this is unused. * src/autofit/afscript.h: Do it. * src/autofit/afglobal.c, src/autofit/afpic.c, src/autofit/aftypes.h: Updated.
Werner Lemberg 955f6a86 2013-10-16T19:47:57 [autofit] Improve tracing message for extra light flag. * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Do it.
Chongyu Zhu 41632b58 2013-10-15T11:40:34 [arm] Fix thumb2 inline assembly under LLVM. When using `ADD' with an immediate operand, the instruction is actually `ADD Rd, Rn, #<imm12>', that is, the maximum of the immediate operand cannot exceed 4095. It will fail to compile with LLVM. However, in GCC, due to some legacy compatibility considerations, `ADD.W' will be automatically emitted when the immediate operand is larger than 4095. * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h (FT_MulFix_arm) [__GNUC__]: Support clang compiler. * src/truetype/ttinterp.c (TT_MulFix14_arm) [__GNUC__]: Ditto.
Werner Lemberg b6695243 2013-10-12T10:33:04 [autofit] Improve tracing of `latin' hinter. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Report blue zone types. (af_latin_metrics_scale_dim): Report scaling changes due to x height alignment. Report scaled stroke width and blue zone values.
Werner Lemberg 2c56f2ab 2013-10-07T22:01:00 Improve last ChangeLog entry.
Dave Arnold e845a85e 2013-10-03T23:04:29 * src/cff/cf2font.c (cf2_computeDarkening): Avoid division by zero.
Werner Lemberg 1a39944f 2013-10-03T06:16:50 Updated CHANGES file.
Darrell Bellert 01af71d4 2013-10-02T22:04:07 * src/sfnt/ttload.c (tt_face_load_pclt): Fix `pclt_fields'.
Dave Arnold 0b330452 2013-10-02T11:04:06 * src/cff/cf2font.c (cf2_computeDarkening): Initialize darkenAmount. This line was lost in commit 89ca1fd6 (from 2013-06-25). The effect is to use a previous darkening amount when producing an unhinted, unscaled outline. This can cause autohint samples in ftgrid and ftview to be based on darkened CFF outlines instead of unhinted, undarkened ones.
Dave Arnold 3a2cb0f8 2013-09-29T16:17:02 Fix Savannah bug #39295. The bug was caused by switching to the initial hintmap (the one in effect when `moveto' executes) just before drawing the final element in the charstring. This ensured that the path was closed (in both Character Space and Device Space). But if the final element was a curve and if the final hintmap was different enough from the initial one, then the curve was visibly distorted. The first part of the fix is to draw the final curve using the final hintmap as specified by the charstring. This corrects the distortion but does not ensure closing in Device Space. It may require the rasterizer to automatically generate an extra closing line. Depending on the hintmap differences, this line could be from zero to a couple pixels in length. The second part of the fix covers the case where the charstring subpath is closed with an explicit line. We now modify that line's end point to avoid the distortion. Some glyphs in the bug report font (TexGyreHeros-Regular) that show the change are: 25ppem S (98) 24ppem eight (52) 25.5ppem p (85) Curves at the *end* of a subpath are no longer distorted. However, some of these glyphs have bad hint substitutions in the middle of a subpath, and these are not affected. The patch has been tested with a set of 106 fonts that shipped with Adobe Creative Suite 4, together with 756 Open Source CFF fonts from Google Fonts. There are 1.5 million glyphs, of which some 20k are changed with the fix. A sampling of a few hundred of these changes have been examined more closely, and the changes look good (or at least acceptable). * src/cff/cf2hints.h (CF2_GlyphPathRec): New element `pathIsClosing' to indicate that we synthesize a closepath line. * src/cff/cf2hints.c (cf2_glyphpath_init): Updated. (cf2_glyphpath_pushPrevElem): If closing, use first hint map (for `lineto' operator) and adjust hint zone. For synthesized closing lines, use end point in first hint zone. (cf2_glyphpath_lineTo): Take care of synthesized closing lines. In particular, shift the detection of zero-length lines from character space to device space. (cf2_glyphpath_closeOpenPath): Remove assertion. Updated.
Werner Lemberg 4f9760e7 2013-09-25T23:32:25 [autofit] Remove outdated comment.
Werner Lemberg b75a8b88 2013-09-25T09:46:36 * src/autofit/aflatin.c (af_{grek,cyrl}_uniranges): Fix arrays.
Werner Lemberg 964317e8 2013-09-25T09:22:40 Minor.
suzuki toshiya ac0f4454 2013-09-25T10:57:17 [bdf, pcf] Refuse non-zero face_index. Suggested by Akira Tagoh, see http://lists.gnu.org/archive/html/freetype/2013-09/msg00030.html * src/bdf/bdfdrivr.c (BDF_Face_Init): Return Invalid_Argument error when the font could be opened but non-zero face_index is given. * src/pcf/pcfdrivr.c (PCF_Face_Init): Ditto. * src/type42/t42objs.c (T42_Face_Init): Remove unrequired FT_UNUSED macro for face_index because it is validated in later.
Werner Lemberg 4de7787f 2013-09-23T22:10:08 Fix Savannah bug #40090. * src/autofit/afcjk.c (af_cjk_metrics_scale): Revert commit 306f8c5d (from 2013-08-25) affecting this function.
Werner Lemberg 5a4c5a5b 2013-09-22T22:37:26 [autofit] Disunify Cyrillic and Greek handling from Latin. * src/autofit/afscript.h: Add Cyrillic and Greek. * src/autofit/afblue.dat (AF_BLUE_STRINGSET_GREK, AF_BLUE_STRINGSET_CYRL): Add blue zones for Greek and Cyrillic. (AF_BLUE_STRINGSET_LATN): Fix typo. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.c (af_grek_uniranges, af_cyrl_uniranges): New arrays. (af_grek_script_class, af_cyrl_script_class): New scripts. * src/autofit/aflatin.h: Updated.
Werner Lemberg 2cca9669 2013-09-20T07:23:34 * docs/CHANGES: Updated.
Behdad Esfahbod 31e726d9 2013-09-20T07:20:53 Fix vertical size of emboldened glyphs. Cf. https://bugzilla.gnome.org/show_bug.cgi?id=686709 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Adjust `horiBearingY' also.
Alexei Podtelezhnikov 52381c14 2013-09-11T23:25:56 * include/freetype/ftoutln.h: Correct FT_Outline_Get_Orientation algorithm description.
Werner Lemberg 3f542498 2013-09-11T23:08:31 [autofit] Improve Hebrew rendering. This change introduces a new blue zone property `AF_BLUE_PROPERTY_LATIN_LONG' to make the auto-hinter ignore short top segments. * src/autofit/afblue.dat: Fix Hebrew blue strings. Use AF_BLUE_PROPERTY_LATIN_LONG for AF_BLUE_STRING_HEBREW_TOP. * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_LONG): New macro. * src/autofit/afblue.c, src/autofit/afblue.h: Updated. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Handle `AF_LATIN_IS_LONG_BLUE'. * src/autofit/aflatin.h (AF_LATIN_IS_LONG_BLUE): New macro.
Werner Lemberg 00ea2a13 2013-09-03T11:33:10 [doc] s/which/that/ where appropriate. Note that this is a try by a non-native English speaker whose mother language (German) doesn't have this distinction at all...
Werner Lemberg 504f5b4a 2013-09-02T22:08:12 Fix Savannah bug #39905 (documentation only).
Werner Lemberg 85a7fdf3 2013-08-29T21:03:05 [sfnt] Fix frame access while reading WOFF table directory. * src/sfnt/sfobjs.c (woff_open_font): Using single memory frame while reading the directory entries for the whole loop.
Werner Lemberg d689d1cf 2013-08-29T17:53:40 Implement support for WOFF containers. We simply synthesize a SFNT from the WOFF, create a memory stream for the new data, and load the SFNT as usual. Does NOT add any API to access WOFF metadata or private blocks. * include/freetype/internal/tttypes.h (WOFF_HeaderRec, WOFF_TableRec): New structures. * include/freetype/tttags.h (TTAG_wOFF): New macro. * src/base/ftobjs.c (FT_Open_Face): Set `stream' after calling `open_face'. * src/sfnt/sfobjs.c [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Include `FT_GZIP_H'. (WRITE_BYTE, WRITE_USHORT, WRITE_ULONG): New temporary macros for writing to a stream. (sfnt_stream_close, compare_offsets, woff_open_font): New functions. (sfnt_open_font): Handle `TTAG_wOFF'. (sfnt_init_face): Set `stream' after calling `sfnt_open_font'. * src/truetype/ttobjs.c (tt_face_init): Set `stream' after calling `sfnt->init_face'. * src/base/ftobjs.c (open_face): Use a pointer to FT_Stream as an argument so that a changed stream survives. Update callers.
Werner Lemberg dc240524 2013-08-29T17:53:24 [gzip] New function `FT_Gzip_Uncompress'. This is modeled after zlib's `uncompress' function. We need this for WOFF support. * include/freetype/ftgzip.h, src/gzip/ftgzip.c (FT_Gzip_Uncompress): New function. * src/gzip/rules.mk: Rewrite to better reflect dependencies.
Werner Lemberg 5195ecd6 2013-08-28T17:41:21 [autofit] Fix `make multi' compilation. * src/autofit/afblue.cin, src/autofit/afblue.c: Don't include `afblue.h' but `aftypes.h'. * src/autofit/afcjk.c: Don't include `aftypes.h' but `afglobal.h'.
Werner Lemberg e0f39aef 2013-08-28T17:34:01 [autofit] Fix C++ compilation. * src/autofit/afglobal.c (af_face_globals_get_metrics), src/autofit/afdummy.c (af_dflt_script_class), src/autofit/afindic.c (af_deva_script_class): Use proper casts.
Behdad Esfahbod c799dd67 2013-08-27T21:46:03 * src/sfnt/ttload.c (tt_face_load_font_dir): Fix sign typos.
Behdad Esfahbod bd3849e7 2013-08-27T21:43:38 FT_Open_Face: Improve external stream handling. If the font's `clazz->init_face' function wants to swap to new stream, handling of whether original stream was external could result to either memory leak or double free. Mark externality into face flags before calling `init_face' such that the clazz can handle external streams properly. * src/base/ftobjs.c (FT_Open_Face): Move code to set FT_FACE_FLAG_EXTERNAL_STREAM to... (open_face): This function.
Werner Lemberg bcd8c0b0 2013-08-27T21:36:03 Remove `FT_SqrtFixed' function. It's no longer used. * include/freetype/internal/ftcalc.h, src/base/ftcalc.c: Do it.
Werner Lemberg 71c0ad65 2013-08-27T21:30:09 Whitespace.
Werner Lemberg 5e53db25 2013-08-27T18:37:39 [autofit] While tracing, report script names instead of ID values. * src/autofit/afglobal.c (af_script_names) [FT_DEBUG_LEVEL_TRACE]: New array. * src/autofit/afglobal.h: Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_hint_edges): Use `af_script_names'. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_hint_edges): Ditto.
Werner Lemberg 278f64b3 2013-08-26T20:20:03 [autofit] Report used script while hinting a glyph. * src/autofit/afcjk.c (af_cjk_hint_edges), src/autofit/aflatin.c (af_latin_hint_edges): Implement it.
Werner Lemberg 371f5c3b 2013-08-26T20:11:24 [autofit] Add support for Hebrew script. * src/autofit/afblue.dat: Add blue strings for Hebrew. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.c (af_hebr_uniranges): New array. (af_hebr_script_class): New script. * src/autofit/aflatin.h, src/autofit/afscript.h: Updated.
Werner Lemberg 098121db 2013-08-26T18:54:05 [autofit] Improve tracing messages. * src/autofit/afcjk.c (af_cjk_metrics_init_widths): Mention script ID in tracing message. (af_cjk_metrics_init_blues): Initialize `axis' outside of the inner loop. Improve tracing messages. (af_cjk_hint_edges) [FT_DEBUG_LEVEL_TRACE]: New variable `num_actions' to count hinting actions. Improve tracing messages. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Mention script ID in tracing message. (af_latin_metrics_init_blues, af_latin_hint_edges): Improve tracing messages.
Werner Lemberg ffee64af 2013-08-26T12:55:48 Better tracing of loaded glyphs. Previously, the loading of a glyph was traced at level 4, if at all. With this change, all font loading routines emit a tracing message at level 1, making it easier to select tracing output (for example using F2_DEBUG="any:1 afhints:7 aflatin:7"). * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Add tracing message. * src/cff/cffdrivr.c (cff_glyph_load): Ditto. * src/cff/cffgload.c (cff_decoder_prepare): Improve tracing messages. * src/cid/cidgload.c (cid_load_glyph): Use level 1 for tracing message. * src/pcf/pcfdrivr.c (PCF_Glyph_Load): Ditto. * src/pfr/pfrobjs.c (pfr_slot_load): Add tracing message. * src/truetype/ttgload.c (TT_Load_Glyph): Ditto. * src/type1/t1gload.c (T1_Load_Glyph): Ditto. * src/type42/t42objs.c (T42_GlyphSlot_Load): Ditto. * src/winfonts/winfnt.c (FNT_Load_Glyph): Ditto.
Werner Lemberg 33655a96 2013-08-26T09:58:50 [autofit] Fix script selection. * src/autofit/afglobal.c (af_face_globals_get_metrics): Use `AF_SCRIPT_DFLT', not value 0. Simplify code. * src/autofit/afscript.h: Sort by script name.
Werner Lemberg 92f5a047 2013-08-26T09:22:27 [autofit] Make `dummy' hinter work as expected. * src/autofit/afdummy.c (af_dummy_hints_init): Properly set scaling information. (af_dummy_hints_apply): Scale the glyphs.
Werner Lemberg c1eb4459 2013-08-25T19:47:26 [autofit] Make `cjk' module use blue stringsets. * src/autofit/afcjk.c (AF_CJK_MAX_TEST_CHARACTERS): Removed. (af_cjk_hani_blue_chars): Removed. (AF_CJK_BLUE_TYPE_*): Removed. (af_cjk_metrics_init_blues): Replace AF_CJK_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'). Instead of three dimensions (as used in the old blue string array) we now use properties to do the same, saving one loop nesting level. * src/autofit/afcjk.h: Remove old enumeration values superseded by the new data in `afblue.h'. (AF_CJK_IS_TOP_BLUE, AF_CJK_IS_HORIZ_BLUE, AF_CJK_IS_FILLED_BLUE, AF_CJK_IS_RIGHT_BLUE): New macros, to be used in `af_cjk_metrics_init_blues'. (AF_CJK_BLUE_IS_RIGHT): Remove this now redundant enum value. (AF_CJK_BLUE_IS_TOP): Renamed to... (AF_CJK_BLUE_TOP): This. (AF_CJK_MAX_BLUES): Remove. (AF_CJKAxisRec): Updated.
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.
Werner Lemberg 4af44440 2013-08-18T18:46:30 * builds/unix/unix-def.in (freetype2.pc): Don't set executable bit.
Werner Lemberg 6bfa263a 2013-08-18T18:34:05 Fix Savannah bug #39804. * builds/unix/configure.raw (LIBPNG): Define and export. * builds/unix/freetype-config.in, builds/unix/freetype2.in: Handle libpng.
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 9e6de36a 2013-08-05T16:37:21 Fix Savannah bug #39700. * builds/unix/ftconfig.h: Synchronize with `include/freetype/config/ftconfig.h'. * builds/vms/ftconfig.h: Ditto. Make the differences to the master `ftconfig.h' file as small as possible for easier maintainance.
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 0d28a7d6 2013-08-02T22:59:43 * include/freetype/ftcffdrv.h: Improve documentation. This is based on blog entries from David Lemon and Dave Arnold (both from Adobe) with kind permission. Dave also helped in proof-reading.
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 2b29ed66 2013-07-30T13:55:29 Ignore libpng-config under cross-building configuration, because it will return the flags for the hosting environment. * builds/unix/configure.raw: Ignore libpng-config when `cross_compiling' == yes.
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().
Werner Lemberg 6a7df625 2013-07-20T10:48:37 * docs/INSTALL.GNU: Updated.
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.
David Turner b2890886 2013-07-16T12:52:18 Optimize FT_MulFix for x86_64 GCC builds. This patch provides an optimized `FT_MulFix' implementation for x86_64 machines when FreeType is built with GCC, or compatible compilers like Clang. Example: bin/ftbench -p -t 5 -s 14 -f 0008 Arial.ttf Before: Load 4.863 us/op Load_Advances (Normal) 4.816 us/op Load_Advances (Fast) 0.028 us/op Render 2.753 us/op Get_Glyph 0.463 us/op Get_CBox 0.077 us/op Get_Char_Index 0.023 us/op Iterate CMap 13.898 us/op New_Face 12.368 us/op Embolden 0.028 us/op Get_BBox 0.302 us/op After: Load 4.617 us/op Load_Advances (Normal) 4.645 us/op Load_Advances (Fast) 0.027 us/op Render 2.789 us/op Get_Glyph 0.460 us/op Get_CBox 0.077 us/op Get_Char_Index 0.024 us/op Iterate CMap 13.403 us/op New_Face 12.278 us/op Embolden 0.028 us/op Get_BBox 0.301 us/op * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h (FT_MulFix_x86_64): New function.
David Turner a5f33eeb 2013-07-16T12:40:03 Speed up ARMv7 support. When building for ARMv7 with thumb2 instructions, the optimized `FT_MulFix_arm' assembly routine was not being used. The reason for this is in the `ftconfig.h' header, namely: - The assembly routine uses the `smull' instruction which is not available when generating Thumb-1 machine code. It is available in Thumb-2 mode, though. - The header was written a long time ago before Thumb-2 became widely popular (e.g. with Android). So it simply doesn't use the assembly routine if the `__thumb__' built-in macro is defined. - When compiling in Thumb-2 mode, the compiler will define both `__thumb__' and `__thumb2__'. By checking for `(__thumb2__ || !__thumb__)', we ensure that the assembly routine is only avoided when generating Thumb-1 code. Given that this is performance-sensitive function, this improves `ftbench' as follows on a Galaxy Nexus: Before (us/op) After (us/op) - loading Arial.ttf glyphs at 14 ppem [1] Load 34.285 33.098 - same operation with the light auto-hinter [2] Load 31.317 29.590 - same operation without hinting [3] Load 6.143 5.376 - loading Arial.ttf advances at 14 ppem [4] Load_Advances (normal) 34.216 33.016 Load_Advances (fast) 0.176 0.176 [1] ftbench -t 5 -p -s 14 -b a -f 0008 Arial.ttf [2] ftbench -t 5 -p -s 14 -b a -r 1 -f 0028 Arial.ttf [3] ftbench -t 5 -p -s 14 -b a -f 000a Arial.ttf [4] ftbench -t 5 -p -s 14 -b b -f 0008 Arial.ttf * builds/unix/ftconfig.in, include/freetype/config/ftconfig.h (FT_MULFIX_ASSEMBLER): Fix handling for ARMv7.
Werner Lemberg aa0ac323 2013-07-02T10:36:26 [sfnt] Fix documentation of `tt_face_get_metrics'. Problem reported in Savannah bug #39383.
Werner Lemberg a411de91 2013-06-28T07:59:42 One more update to `CHANGES' file.
Werner Lemberg e12fc77e 2013-06-28T07:57:32 * docs/CHANGES: Updated.
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 ffb8b473 2013-06-25T09:09:30 * builds/freetype.mk (dll): Remove target. Problem reported by Jörg Günnewig <joerg.guennewig@googlemail.com>.
Werner Lemberg 979c5c50 2013-06-25T07:48:38 [doc] Fix hyperlinks.
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.