src


Log

Author Commit Date CI Message
Werner Lemberg 63bef9a5 2014-05-01T07:16:05 [autofit] Fix handling of neutral blue zones in stems. * src/autofit/afhints.h (AF_Edge_Flags): New value `AF_EDGE_NEUTRAL'. * src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Trace neutral blue zones with AF_EDGE_NEUTRAL. (af_latin_hint_edges): Skip neutral blue zones if necessary.
Werner Lemberg ccfc4b4c 2014-04-28T21:13:14 [autofit] Introduce neutral blue zones to the latin module. Such blue zones match either the top or the bottom of a contour. We need them for scripts where accent-like elements directly touch the base character (for example, some vowel signs in Devanagari, cf. U+0913 or U+0914). * src/autofit/afblue.hin (AF_BLUE_PROPERTY_LATIN_NEUTRAL): New property. * src/autofit/afblue.h: Regenerated. * src/autofit/aflatin.h (AF_LATIN_IS_NEUTRAL_BLUE): New macro. (AF_LATIN_BLUE_NEUTRAL): New enumeration value. * src/autofit/aflatin.c (af_latin_metrics_init_blues, af_latin_hints_compute_blue_edges): Handle neutral blue zones.
Werner Lemberg abb3fcac 2014-04-25T22:13:32 * src/autofit/hbshim.c: Partially revert commit from 2014-04-17. Using input glyph coverage data is simply wrong. Problem reported by Nikolaus Waxweiler <madigens@gmail.com> and Mantas Mikulėnas <grawity@gmail.com>.
Werner Lemberg 426f0e04 2014-04-24T07:13:31 Minor.
Werner Lemberg f193637f 2014-04-23T08:22:33 * src/raster/ftraster.c (Vertical_Sweep_Span): Use drop-out mode. This spot has been missed while introducing support for various drop-out modes years ago (including no drop-out mode, which this commit fixes). Problem reported by Patrick Thomas <pthomas505@gmail.com>.
Werner Lemberg d9b4470e 2014-04-22T07:33:07 * src/sfnt/pngshim.c (error_callback): s/longjmp/ft_longjmp/.
Werner Lemberg 98e510ee 2014-04-20T22:11:27 [autofit] Fix Savannah bug #42148. The adaptation of the cjk auto-hinter module to blue stringsets in 2013-08-25 had three severe bugs. Mea culpa. 1. Contrary to the latin auto-hinter, characters for reference and overshoot values of a blue zone are specified separately. Due to the screwed-up change it didn't work at all. 2. A boolean comparison was erroneously replaced with a cast, causing invalid results with the `^' operator later on. The visual artifact caused by this problem is the topic of the bug report. 3. Two flag values were inverted, causing incorrect assignment of reference and overshoot values. * src/autofit/afblue.dat: Fix CJK bluestrings, introducing a new syntax to have both reference and overshoot characters in a single string. This is error #1. Add extensive comments. * src/autofit/afblue.hin (AF_BLUE_PROPERTY_CJK_FILL): Removed, no longer used. (AF_BLUE_PROPERTY_CJK_TOP, AF_BLUE_PROPERTY_CJK_HORIZ): Fix values. This is error #3. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Correct error #1. Use character `|' to separate characters for reference and overshoot values. Improve tracing messages, synchronizing them with the latin auto-hinter. (af_cjk_hints_compute_blue_edges): Fix value of `is_top_right_blue'. This is error #2. (af_cjk_align_linked_edge): Add tracing message. * src/autofit/afcjk.h (AF_CJK_IS_FILLED_BLUE): Removed, no longer used.
Werner Lemberg 8c7fb78b 2014-04-17T15:53:25 [autofit] More coverage fixes for complex scripts. * src/autofit/hbshim.c (af_get_coverage): Merge input glyph coverage of GSUB lookups into output coverage. Otherwise, ligatures are not handled properly. Don't check blue zone characters for default coverage.
Werner Lemberg bbd8313b 2014-04-17T01:24:36 Make `FT_Get_SubGlyph_Info' actually work. * src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok if there is no error.
Werner Lemberg 181fd071 2014-04-15T16:47:05 [afblue.pl]: Minor improvements. * src/tools/afblue.pl: Allow whitespace before comments. Ignore whitespace in strings.
Werner Lemberg 8b1f2a6c 2014-04-14T07:58:19 [autofit] Improve coverage handling. * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs appearing in the GPOS table if we are processing the default coverage.
David Weber 7630787a 2014-04-13T15:41:13 [smooth] Fix stand-alone compilation. * src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
Werner Lemberg 8a94b1ef 2014-04-12T20:44:33 [autofit] Redesign the recognition algorithm of strong points. In particular, local extrema without horizontal or vertical segments are better recognized: + A + D \ / \ / \ / \ / \ + C \ / B +/ If the distances AB and CD are large, point B wasn't previously detected as an extremum since the `ft_corner_is_flat' function `swallowed' BC regardless of its direction, tagging point B as weak. The next iteration started at B and made `ft_corner_is_flat' swallow point C, tagging it as weak also, et voilà. To improve that, another pass gets now performed before calling `ft_corner_is_flat' to improve the `topology' of an outline: A sequence of non-horizontal or non-vertical vectors that point into the same quadrant are handled as a single, large vector. Additionally, distances of near points are now accumulated, which makes the auto-hinter handle them as if they were prepended to the next non-near vector. This generally improves the auto-hinter's rendering results. * src/autofit/afhints.c (af_glyph_hints_reload): Implement it. * src/autofit/afhints.h (AF_FLAGS): Remove no longer used flag `AF_FLAG_NEAR'.
Werner Lemberg 71f53e12 2014-04-05T16:27:19 [autofit] Improve scoring algorithm for identifying stems. Problem reported by Karsten Lücke <karsten.luecke@kltf.de>. The new algorithm takes care of the width of stems: If the distance between two segments is larger than the largest stem width, the demerits quickly increase for larger distances. This improves hinting of slanted fonts (especially if the inner parts of serifs have non-horizontal `shoulders'), avoiding false stem links. * src/autofit/aflatin.c (af_latin_hints_link_segments): Use largest stem width (if available) to compute better demerits for distances between stems. (af_latin_hints_detect_features): Pass stem width array and array size. (af_latin_metrics_init_widths): Updated to use original algorithm. (af_latin_hints_apply): Updated to use new algorithm. * src/autofit/aflatin.h: Updated. * src/autofit/afcjk.c: Updated.
Werner Lemberg 87360a78 2014-04-05T00:08:52 [aflatin] Improve comment.
Werner Lemberg f8555b5d 2014-04-03T05:45:38 Don't require `gzip' module for `sfnt'. Reported by Preet <prismatic.project@gmail.com>. * src/sfnt/sfobjs.c (woff_open_font): Guard use of FT_Gzip_Uncompress with FT_CONFIG_OPTION_USE_ZLIB.
Werner Lemberg d5159925 2014-03-22T06:20:54 Another revert for the change from 2014-03-18. Problem reported by Nikolaus Waxweiler <madigens@gmail.com>. * src/base/ftcalc.c (FT_MulFix): Ensure that an `FT_MulFix' symbol gets always exported.
Werner Lemberg cc7cf2c3 2014-03-19T07:35:35 Partially revert last commit. Found by Alexei. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initializing those variables is plain wrong, since we are in a loop.
Sean McBride 87628724 2014-03-18T08:39:35 Fix clang warnings. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize some variables. * src/base/ftcalc.c (FT_MulFix): Only use code if `FT_MULFIX_INLINED' is not defined. * src/bdf/bdfdrivr.c (bdf_cmap_class), src/cache/ftcbasic.c (ftc_basic_image_family_class, ftc_basic_image_cache_class, ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class), src/cache/ftccmap.c (ftc_cmap_cache_class), src/cache/ftcmanag.c (ftc_size_list_class, ftc_face_list_class), src/pcf/pcfdrivr.c (pcf_cmap_class), src/pfr/pfrdrivr.c (pfr_metrics_service_rec): Make function static. * src/type1/t1driver.c (t1_ps_get_font_value): Remove redundant code.
Werner Lemberg 23367ff9 2014-03-17T07:33:14 Fix Savannah bug #41869. This works around a problem with HarfBuzz (<= 0.9.26), which doesn't validate glyph indices returned by `hb_ot_layout_lookup_collect_glyphs'. * src/autofit/hbshim.c (af_get_coverage): Guard `idx'. * docs/CHANGES: Updated.
Alan Coopersmith ed372b71 2014-03-09T06:14:12 Fix cppcheck 1.64 warning. * src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer dereference in case of error.
Werner Lemberg 1a69dc7c 2014-03-09T06:06:58 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
Werner Lemberg 05565366 2014-03-06T18:56:58 Fixes for compilation with C++. * src/autofit/hbshim.c (scripts): Change type to `hb_script_t'. (af_get_coverage): Updated. (COVERAGE): Add cast.
Sean McBride b24e8d33 2014-03-06T14:54:22 Remove more clang analyzer warnings. * src/bdf/bdflib.c (_bdf_readstream), src/truetype/ttgload.c (TT_Load_Glyph): Remove dead stores.
Werner Lemberg 7ac76b50 2014-03-04T04:29:17 Fix several clang static analyzer dead store warnings. * src/autofit/afhints.c (af_glyph_hints_reload, af_glyph_hints_align_weak_points): Remove unnecessary assignments. * src/bdf/bdflib.c (bdf_font_load): Ditto. * src/pshinter/pshalgo.c (psh_glyph_compute_extrema, psh_glyph_interpolate_other_points): Ditto. * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
Alexei Podtelezhnikov 6adda68a 2014-02-28T09:24:26 Math simplifications. * src/cf2blues.c (cf2_blues_init): Use `FT_MulDiv'. * src/cf2ft.c (cf2_getScaleAndHintFlag): Use simple division.
Dave Arnold 135c3fae 2014-02-28T07:42:42 Fix Savannah bug #41697, part 2. * src/cff/cf2ft.c (cf2_initLocalRegionBuffer, cf2_initGlobalRegionBuffer): It is possible for a charstring to call a subroutine if no subroutines exist. This is an error but should not trigger an assert. Split the assert to account for this.
Dave Arnold 0eae6eb0 2014-02-28T07:40:01 Fix Savannah bug #41697, part 1. * src/cff/cf2hints.c (cf2_hintmap_build): Return when `hintMask' is invalid. In this case, it is not safe to use the length of `hStemHintArray'; the exception has already been recorded in `hintMask'.
Werner Lemberg a2b5f66b 2014-02-26T19:50:18 [sfnt] Fix Savannah bug #41696. * src/sfnt/ttcmap.c (tt_cmap0_validate, tt_cmap2_validate, tt_cmap4_validate, tt_cmap14_validate): Fix limit tests.
Werner Lemberg eee4ff8d 2014-02-26T18:12:36 [winfnt] Fix Savannah bug #41694. * src/winfonts/winfnt.c (FNT_Load_Glyph): Check glyph offset.
Werner Lemberg 08c628d1 2014-02-26T14:18:03 [cff] Fix Savannah bug #41693. * src/cff/cffload.c (CFF_Load_FD_Select): Reject empty array.
Werner Lemberg 9a567640 2014-02-26T13:08:07 [bdf] Fix Savannah bug #41692. bdflib puts data from the input stream into a buffer in chunks of 1024 bytes. The data itself gets then parsed line by line, simply increasing the current pointer into the buffer; if the search for the final newline character exceeds the buffer size, more data gets read. However, in case the current line's end is very near to the buffer end, and the keyword to compare with is longer than the current line's length, an out-of-bounds read might happen since `memcmp' doesn't stop properly at the string end. * src/bdf/bdflib.c: s/ft_memcmp/ft_strncmp/ to make comparisons stop at string ends.
Werner Lemberg 6b290fd2 2014-02-19T09:26:54 Fix Savannah bug #32902. Patch taken from https://code.google.com/p/sumatrapdf/source/browse/trunk/ext/_patches/freetype2.patch?spec=svn8620&r=8620#87 with slight modifications. * src/type1/t1parse.c (T1_Get_Private_Dict): Add heuristic test to handle fonts that incorrectly use \r at the beginning of an eexec block.
Simon Bünzli df14e6c0 2014-02-19T08:42:52 Fix Savannah bug #41590. * src/type1/t1load.c (parse_encoding): Protect against invalid number.
suzuki toshiya 91c7a97b 2014-02-17T16:38:31 [autofit] Fix `make multi' compilation. * src/hbshim.c: Include `afglobal.h' and `aftypes.h'.
Dave Arnold 89a94d42 2014-02-12T23:45:47 [cff] Optimize by using `FT_MulDiv'. Suggested by Alexei. * src/cff/cf2font.c (cf2_computeDarkening): Do it.
Sean McBride 7be2a94a 2014-02-08T13:55:38 Fix clang static analyzer and compiler warnings. * src/autofit/afhints.c (af_glyph_hints_align_weak_points), src/autofit/afloader (af_loader_load_g) <FT_GLYPH_FORMAT_COMPOSITE>, src/base/ftcalc.c (FT_MSB), src/base/ftoutln.c (FT_Outline_Decompose), src/bdf/bdfdrivr.c (bdf_interpret_style), src/cff/cffparse.c (cff_parse_integer), src/cid/cidparse.c (cid_parser_new), src/pfr/pfrload.c (pfr_phy_font_load), src/raster/ftraster.c (Decompose_Curve), src/sfnt/sfdriver.c (sfnt_get_ps_name), src/sfnt/ttcmap.c (tt_cmap12_next, tt_cmap13_next), src/smooth/ftgrays.c (gray_hline): Remove dead code. * src/autofit/afmodule.c (af_property_get_face_globals, af_property_set, af_property_get), src/base/ftbitmap.c (ft_gray_for_premultiplied_srgb_bgra): Make functions static. * src/base/ftobjs.c (ft_remove_renderer): Protect against library == NULL. (ft_property_do): Make function static. * src/base/ftrfork.c: Include `ftbase.h'. * src/sfnt/ttsbit.c (tt_face_load_sbix_image) [!FT_CONFIG_OPTION_USE_PNG], src/type1/t1gload.c (T1_Compute_Max_Advance): Avoid compiler warning. * src/truetype/ttinterp.c (TT_New_Context): Reduce scope of variable.
Eugen Sawin a8ceae40 2014-02-08T06:30:06 Fix Savannah bug #41507. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) [!FT_CONFIG_OPTION_USE_PNG] <17, 17, 19>: Fix error handling.
Dave Arnold 355b359e 2014-02-08T06:23:04 [cff] Fix minor performance bug. * src/cff/cf2font.c (cf2_font_setup): Darkening amount and blue zone calculations are now cached and not recomputed on each glyph.
Werner Lemberg 6dce1369 2014-02-05T15:40:47 Fix problems with perl 5.8.8 as distributed with current MinGW. * src/tools/afblue.pl: Work-around for Perl bug #63402. (string_re): Avoid `possessive quantifiers', which have been introduced in Perl version 5.10.
Werner Lemberg 741f7366 2014-02-05T14:51:51 Work-around for Perl bug #63402.
Werner Lemberg a8772918 2014-02-04T11:36:08 [autofit] Minor fix. * src/autofit/afcjk.c (af_cjk_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths): Fix handling of alternative standard characters. This also fixes a compilation warning in non-debug mode.
Werner Lemberg ee3778d3 2014-02-03T11:16:47 [cff] Fix Savannah bug #41363. * src/cff/cf2ft.c (cf2_checkTransform): Convert assertion into parameter check. (cf2_decoder_parse_charstrings): Call `cf2_checkTransform' only if we are scaling the outline. (cf2_getPpemY): Remove problematic assertion.
Werner Lemberg a3364001 2014-01-26T09:45:23 [autofit] Introduce two more slots for standard characters. This is useful for OpenType features like `c2sc' (caps to small caps) that don't have lowercase letters by definition, or other features that mainly operate on numerals. * src/autofit/afscript.h: Add more standard characters. * src/autofit/aftypes.h: Update use of `SCRIPT' macro. (AF_ScriptClassRec): Add members to hold two more standard characters. (AF_DEFINE_SCRIPT_CLASS): Updated. * src/autofit/afglobal.c, src/autofit/afglobal.h, * src/autofit/afpic.c, src/autofit/afranges.h, src/autofit/hbshim.c: Update use of `SCRIPT' macro. * src/autofit/afcjk.c (af_cjk_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths): Scan two more standard characters.
Werner Lemberg eb7691cc 2014-01-24T19:04:22 Fix Savannah bug #41320. * src/autofit/aflatin.c (af_latin_metrics_init_blues) <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
Werner Lemberg 752f3912 2014-01-23T09:14:25 Fix Savannah bug #41310. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_bitmap) <glyph_format==5>: Don't check metrics, which this format doesn't have. This is another correction to the commit from 2013-11-21.
Werner Lemberg 8b281f83 2014-01-23T08:14:53 Fix Savannah bug #41309. * src/type1/t1load.c (t1_parse_font_matrix): Properly handle result of `T1_ToFixedArray'. * src/cid/cidload.c (cid_parse_font_matrix): Synchronize with `t1_parse_font_matrix'. * src/type42/t42parse.c (t42_parse_font_matrix): Synchronize with `t1_parse_font_matrix'. (t42_parse_encoding): Synchronize with `t1_parse_encoding'. * src/psaux/psobjs.c (ps_parser_load_field) <T1_FIELD_TYPE_BBOX>, <T1_FIELD_TYPE_MMOX>: Properly handle result of `ps_tofixedarray'.
Werner Lemberg 039f0496 2014-01-23T07:48:23 Formatting.
Werner Lemberg ff8dc315 2014-01-22T09:19:57 * src/autofit/hbshim.c (af_get_coverage): Fix memory leaks.
Werner Lemberg aae0f1af 2014-01-19T18:27:18 Minor.
Werner Lemberg 6a700786 2014-01-16T08:55:40 [autofit] Improve tracing of style coverages. * include/internal/fttrace.h: Add `afglobal' for tracing style coverages. * src/autofit/afglobal.c: Include FT_INTERNAL_DEBUG_H. (FT_COMPONENT): Define. (af_face_globals_compute_style_coverage): Trace `gstyles' array data.
Werner Lemberg 2b623fe4 2014-01-15T09:46:23 Minor doc issues.
Chongyu Zhu 94c66944 2014-01-08T08:52:59 [arm] Fix Savannah bug #41138, part 2. * builds/unix/ftconfig.in (FT_MulFix_arm), include/config/ftconfig.h (FT_MulFix_arm), src/truetype/ttinterp.c (TT_MulFix14_arm): Fix preprocessor conditionals for `add.w'.
Werner Lemberg c46fa86b 2014-01-08T08:45:40 [autofit] Fix Savannah bug #41138, part 1. * src/tools/afblue.pl <Handling #endif>: Produce correct auxiliary enumeration names for generated `#else'. * src/autofit/afblue.h: Regenerated.
Werner Lemberg 991cbcce 2014-01-05T13:24:56 [autofit] Minor fixes for `afblue.pl'. * src/tools/afblue.pl (aux_name): Don't use `reverse'. <Handling #endif>: Use proper indentation for generated `#else'. * src/autofit/afblue.h: Regenerated.
Werner Lemberg 0d97744d 2014-01-04T11:46:34 [autofit] Fix Indic scripts. Split the single, incorrect Indic entry into separate scripts so that the covered ranges are the same: Bengali, Devanagari, Gujarati, Gurmukhi, Kannada, Limbu, Malayalam, Oriya, Sinhala, Sundanese, Syloti Nagri, Tamil, Telugu, and Tibetan. At the same time, remove entries for Meetai Mayak and Sharada – the Unicode ranges were incorrect (and nobody has complained about that), fonts are scarce for those scripts, and the Indic auto-hinter support is rudimentary anyways. * src/autofit/afscript.h: Updated, using AF_CONFIG_OPTION_INDIC and AF_CONFIG_OPTION_CJK. * src/autofit/afstyles.h (STYLE_DEFAULT_INDIC): New auxiliary macro. Use it, together with AF_CONFIG_OPTION_INDIC and AF_CONFIG_OPTION_CJK, to update. * src/autofit/afranges.c [AF_CONFIG_OPTION_INDIC]: Updated. [!AF_CONFIG_OPTION_INDIC, !AF_CONFIG_OPTION_CJK]: Removed. Sort entries by tags.
Werner Lemberg ecdb0e35 2014-01-03T20:49:31 [autofit] Thinko. * src/autofit/hbshim.c (af_get_char_index): Similar to `af_get_coverage', reject glyphs which are not substituted.
Werner Lemberg 1b5bc897 2014-01-03T18:33:24 [autofit] Fix handling of default coverages. With this commit, the implementation of coverage handling is completed. * src/autofit/hbshim.c (af_get_coverage): Exit early if nothing to do. Reject coverages which don't contain appropriate glyphs for blue zones.
Werner Lemberg a42f9184 2014-01-03T18:29:41 [autofit] Fix handling of default coverages. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): First handle non-default coverages, then the default coverage of the default script, and finally the other default coverages.
Werner Lemberg f45749b0 2014-01-03T18:09:36 [autofit] Fix scaling of HarfBuzz shaping. * src/autofit/hbshim.c (af_get_char_index): Scale to units per EM.
Werner Lemberg ea0367fb 2014-01-03T18:06:45 [autofit] Minor.
Werner Lemberg 5c7f5500 2014-01-03T10:48:26 [autofit] Better ftgrid support. * src/autofit/afhints.c (af_glyph_hints_get_segment_offset): Add parameters `is_blue' and `blue_offset'.
Werner Lemberg 55cd7e0a 2014-01-02T13:07:48 [autofit] Remove some styles. * src/autofit/afcover.h: Remove coverages for alternative fractions, denominators, numerators, and fractions. * src/autofit/afstyles.h (META_STYLE_LATIN): Updated.
Werner Lemberg c973e67b 2014-01-01T16:34:42 [autofit] Add more styles. * src/autofit/afstyles.h (STYLE_LATIN, META_STYLE_LATIN): New auxiliary macros; use them to define styles for Cyrillic, Greek, and Latin. * src/autofit/afcover.h: Remove coverage for oldstyle figures. Since those digits are used in combination with ordinary letters, it makes no sense to handle them separately. * src/autofit/afglobal.c (af_face_globals_get_metrics): Don't limit `options' parameter to 4 bits.
Werner Lemberg abb2f730 2014-01-01T08:00:16 [autofit] Fix style assignments to glyphs. * src/autofit/hbshim.c (af_get_coverage) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Scan GPOS coverage of features also so that we can skip glyphs that have both GSUB and GPOS data.
Werner Lemberg 0950f3a5 2014-01-01T07:48:20 * src/autofit/hbshim.c: s/{lookups,glyphs}/gsub_{lookups,glyphs}/.
Werner Lemberg 73cc8330 2014-01-01T07:10:36 [autofit] Implement and use `af_get_char_index' with HarfBuzz. * src/autofit/hbshim.c (COVERAGE) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Redefine to construct HarfBuzz features. (af_get_char_index) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Rewritten. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Use `y_offset' to adjust `best_y'.
Werner Lemberg 785f3857 2013-12-31T09:45:10 [autofit] s/AF_STYLE_...._DEFAULT/AF_STYLE_...._DFLT/i.
Werner Lemberg c9d9947c 2013-12-31T08:16:57 [autofit] Fix interface of `af_get_char_index'. * src/autofit/hbshim.c (af_get_char_index): Return error value. Add argument for y offset (to be used in a yet-to-come patch). * src/autofit/hbshim.h, src/autofit/afcjk.c, src/autofit/aflatin.c: Updated.
Werner Lemberg 44aa7e0a 2013-12-30T07:41:22 [autofit] Don't combine multiple features into one set. Combining them, as originally envisioned, would lead to much more complicated code, as investigations have shown meanwhile. The major drawback is that we run out of available style slots much earlier. However, this is only a theoretical issue since we don't support a large number of scripts currently. * src/autofit/afcover.h: Replace `COVERAGE_{1,2,3}' macros with a single-element `COVERAGE' macro, sort the elements by the feature tags, and add entry for `ruby'. * src/autofit/aftypes.h: Updated. * src/autofit/hbshim.c: Updated.
Werner Lemberg 072dc45d 2013-12-28T12:26:21 [autofit] Code shuffling to reduce use of cpp macros. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Call `af_get_coverage' unconditionally. * src/autofit/autofit.c: Include `hbshim.c' unconditionally. * src/autofit/hbshim.c (af_get_coverage) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Provide dummy function. * src/autofit/hbshim.h: Provide function declarations unconditionally.
Werner Lemberg 17af586e 2013-12-28T10:33:01 [autofit] Add wrapper function for `FT_Get_Char_Index'. Yet-to-come changes will provide HarfBuzz functionality for the new function. * src/autofit/hbshim.c (af_get_char_index): New function. * src/autofit/hbshim.h: Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_check_digits): Updated.
Werner Lemberg 6af01a04 2013-12-28T08:55:24 [autofit] Use `global' HarfBuzz font object. We now use `hb_font' instead of `hb_face' since yet-to-come changes need this. * src/autofit/afglobal.h: Include `hbshim.h'. (AF_FaceGlobalsRec) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New member `hb_font'. * src/autofit/afglobal.c (af_face_globals_new) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Create `hb_font'. (af_face_globals_free) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Destroy `hb_font'. * src/autofit/hbshim.h: Include HarfBuzz headers. * src/autofit/hbshim.c: Include `hbshim.h' instead of HarfBuzz headers. (af_get_coverage): Updated.
Werner Lemberg d32a7d32 2013-12-27T19:26:04 [autofit] Handle `DFLT' OpenType script for coverages. * include/ftautoh.h: Document new `default-script' property. * src/autofit/hbshim.c (af_get_coverage): Use `AF_FaceGlobals' for type of first parameter. (script_tags): Add one more element. (af_get_coverage): Adjust `script_tags' to handle `DFLT' script tag. * src/autofit/hbshim.h: Updated. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Updated. * src/autofit/afglobal.h (AF_SCRIPT_DEFAULT): New macro. * src/autofit/afmodule.h (AF_ModuleRec): New `default_script' member. * src/autofit/afmodule.c (af_property_set, af_property_get): Handle `default-script' property. (af_autofitter_init): Updated.
Werner Lemberg 00a7b51f 2013-12-27T19:18:49 Minor.
suzuki toshiya e2d2b154 2013-12-27T16:44:24 [ftrfork] Fix the face order difference between POSIX and Carbon. The fragmented resources in Suitcase and .dfont should be reordered when post resource for Type1 is being restored, but reordering of sfnt resources induces the different face order. Now the ordering is restricted to post resource only, to prevent the different order issue (e.g. the face index in the fontconfig cache generated with Carbon framework is incompatible with that by FreeType2 without Carbon framework.) Found by Khaled Hosny and Hin-Tak Leung. http://lists.gnu.org/archive/html/freetype-devel/2013-02/msg00035.html http://lists.gnu.org/archive/html/freetype-devel/2013-12/msg00027.html * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Add a switch `sort_by_res_id' to control the fragmented resource ordering. * include/internal/ftrfork.h: Daclare new switch. * src/base/ftobjs.c (IsMacResource): Enable the soring for post resource, and disable the sorting for sfnt resource.
Werner Lemberg 5f577462 2013-12-25T08:50:50 Fix Savannah bug #40997. * src/bdf/bdfdrivr.c (BDF_Face_Init): Only use OR operator to adjust face flags since FT_FACE_FLAG_EXTERNAL_STREAM might already be set. * src/cff/cffobjs.c (cff_face_init): Ditto. * src/cid/cidobjs.c (cid_face_init): Ditto. * src/pcf/pcfread.c (pcf_load_font): Ditto. * src/pfr/pfrobjs.c (pfr_face_init): Ditto. * src/type1/t1objs.c (T1_Face_Init): Ditto. * src/type42/t42objs.c (T42_Face_Init): Ditto. * src/winfonts/winfnt.c (FNT_Face_Init): Ditto.
Werner Lemberg c7b55a34 2013-12-23T16:42:03 Split off ChangeLog.24.
Werner Lemberg 19241347 2013-12-21T21:31:38 Introduce `coverages'. Coverages are the interface to the HarfBuzz library to access OpenType features for handling glyphs not addressable by the cmap. Right now, compilation of HarfBuzz is only added to the development build. A solution for standard build mode will be delayed until HarfBuzz gets split into two libraries to avoid mutual dependencies between FreeType and HarfBuzz. Note that this is only a first step in handling coverages, basically providing the framework only. Code for handling selected OpenType features (this is, actually using the data in `afcover.h') will follow. * devel/ftoption.h, include/config/ftoption.h (FT_CONFIG_OPTION_USE_HARFBUZZ): New macro. * src/autofit/hbshim.c, src/autofit/hbshim.h, src/autofit/afcover.h: New files. * src/autofit/afscript.h: Add HarfBuzz script name tags. * src/autofit/afstyles.h: Add default coverage enumeration values. * src/autofit/aftypes.h: Update use of `SCRIPT' and `STYLE' macros. (AF_Coverage): New enumeration (generated by `afcover.h'). (AF_StyleClassRec): New member `coverage'. (AF_DEFINE_STYLE_CLASS): Updated. * include/internal/fttrace.h: Add `afharfbuzz' for tracing coverage data. * src/autofit/afglobal.h: Update use of `SCRIPT' and `STYLE' macros. (AF_SCRIPT_FALLBACK): Renamed to ... (AF_STYLE_FALLBACK): ... this. * src/autofit/afglobal.c: Include `hbshim.c'. Update use of `SCRIPT' and `STYLE' macros. (af_face_globals_compute_style_coverage) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call `af_get_coverage'. Update. * src/autofit/afmodule.h (AF_ModuleRec): s/fallback_script/fallback_style/. * src/autofit/afmodule.c (af_property_set): Adapt handling of `fallback-script' property to set a fallback style. (af_property_get, af_autofitter_init): Updated. * src/autofit/afpic.c: Update use of `SCRIPT' and `STYLE' macros. * src/autofit/afranges.h: Update use of `SCRIPT' macro. * src/autofit/autofit.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: Include `hbshim.c'. * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `hbshim.c'. (AUTOF_DRV_H): Add `afcover.h'. * builds/freetype.mk (INCLUDE_FLAGS) [DEVEL_DIR]: Use pkg-config for all libraries needed by FreeType.
Werner Lemberg b337fa25 2013-12-21T19:33:15 Fix Savannah bug #40975 (sort of). * src/truetype/ttinterp.c (Ins_IP): Fix sign typo to make FreeType behave the same as the Windows TrueType engine for the invalid case.
Werner Lemberg 3bf60950 2013-12-21T08:49:11 [autofit] Make PIC mode work actually. * src/autofit/afpic.h (AFModulePIC): Fix array sizes to fit the enumeration values automatically generated by including `afscript.h' and friends. * src/autofit/afpic.c (autofit_module_class_pic_init): Updated.
Werner Lemberg bd413862 2013-12-21T08:14:25 Fix PIC linking. * include/internal/ftrfork.h (CONST_FT_RFORK_RULE_ARRAY_BEGIN): Fix generated function name. * src/base/basepic.c (FT_Init_Table_raccess_guess_table): Rename to ... (FT_Init_Table_ft_raccess_guess_table): ... this so that the function name correctly corresponds to what the macro framework expects. * src/psnames/rules.mk (PSNAMES_DRV_SRC_S): Use correct file name so that PIC functions are compiled also.
Werner Lemberg c4e968ed 2013-12-21T07:23:08 [base] Add missing dependencies to Makefile. * src/base/rules.mk (BASE_SRC): Add `basepic.c' and `ftpic.c'. (BASE_H): Add `basepic.h'.
Werner Lemberg 8a8f3758 2013-12-20T18:35:35 [autofit] Fix PIC compilation. * src/autofit/afcjk.c (af_cjk_metrics_init_widths), src/autofit/aflatin.c (af_latin_metrics_init_widths) [FT_CONFIG_OPTION_PIC]: Declare `globals'. * src/autofit/afglobal.c: Always call AF_DEFINE_SCRIPT_CLASS, and AF_DEFINE_STYLE_CLASS. * src/autofit/afpic.c: Include `afglobal.h'. (autofit_module_class_pic_init): Typo. * src/autofit/aftypes.h (AF_DEFINE_SCRIPT_CLASS, AF_DEFINE_STYLE_CLASS): Don't use the same identifier for macro parameter and structure member.
Werner Lemberg 974b193b 2013-12-20T17:26:26 [autofit] Introduce `styles'. This is the new top-level structure for handling glyph input data; scripts are now defined separately. * src/autofit/aftypes.h (SCRIPT): Updated. (AF_ScriptClassRec): Move `blue_stringset' and `writing_system' members to ... (AF_Style_ClassRec): ... this new structure. (AF_Style): New enumeration. (AF_StyleMetricsRec): Replace `script' enumeration with `style_class' pointer. (AF_DEFINE_SCRIPT_CLASS, AF_DECLARE_SCRIPT_CLASS): Updated. (AF_DEFINE_STYLE_CLASS, AF_DECLARE_STYLE_CLASS): New macros. * src/autofit/afstyles.h: New file, using data from `afscript.h'. * src/autofit/afscript.h: Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated. * src/autofit/afglobal.c (SCRIPT): Updated. (STYLE): Redefine macro to load `afstyles.h'. (af_script_names) [FT_DEBUG_LEVEL_TRACE]: Replace with... (af_style_names): ... this array. (af_face_globals_compute_script_coverage): Renamed to... (af_face_globals_compute_style_coverage): ... this. Updated. (af_face_globals_new, af_face_globals_free, af_face_globals_get_metrics): Updated. * src/autofit/afglobal.h (SCRIPT): Updated. (STYLE): Redefine macro to load `afstyles.h'. (AF_SCRIPT_FALLBACK): Update definition. This will get more refinements with later on. (AF_SCRIPT_UNASSIGNED): Replace with... (AF_STYLE_UNASSIGNED): ... this macro. (AF_FaceGlobalsRec): Updated. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_scale_dim, af_latin_hint_edges): Updated. * src/autofit/aflatin2.c (af_latin2_metrics_init_widths): Updated. (af_ltn2_uniranges): Removed. * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): Updated. * src/autofit/afpic.c (autofit_module_class_pic_init): Updated. * src/autofit/afpic.h (AF_STYLE_CLASSES_GET): New macro. (AFModulePIC): Add `af_style_classes' and `af_style_classes_rec' members. * src/autofit/afranges.h: Updated. * src/autofit/rules.mk (AUTOF_DRV_H): Add `afstyles.h'.
Werner Lemberg d8324571 2013-12-19T15:45:24 [autofit] Factor scripts and uniranges out of writing system files. * src/autofit/afranges.c, src/autofit/afranges.h: New files. * src/autofit/afscript.h: Extend `SCRIPT' macro with more parameters, taking data from the writing system files. * src/autofit/aftypes.h: Updated. * src/autofit/afglobal.c: Include `afranges.h'. Load `afscript.h' to call AF_DEFINE_SCRIPT_CLASS. * src/autofit/afglobal.c: Include `afranges.h'. Load `afscript.h' to call AF_DECLARE_SCRIPT_CLASS. * src/autofit/afcjk.c, src/autofit/afcjk.h: Updated. * src/autofit/afdummy.c, src/autofit/afdummy.h: Updated. * src/autofit/afindic.c, src/autofit/afindic.h: Updated. * src/autofit/aflatin.c, src/autofit/aflatin.h: Updated. * src/autofit/aflatn2.c, src/autofit/aflatn2.h: Updated. * src/autofit/afpic.c: Updated. * src/autofir/autofit.c: Include `afranges.c'. * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afranges.c'.
Werner Lemberg 45930622 2013-12-19T15:24:39 [autofit] Minor.
Werner Lemberg 73f31981 2013-12-19T15:24:17 [autofit] More code orthogonality. * src/autofit/aftypes.h (AF_StyleMetrics): Replace `script_class' pointer to an `AF_ScriptClass' structure with `script' index of type `AF_Script'. Move some code around. * src/autofit/afcjk.c: Include `afpic.h'. (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_hint_edges): Updated. * src/autofit/aflatin.c: Include `afpic.h'. (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_scale_dim, af_latin_hint_edges): Updated. * src/autofit/afglobal.c (af_face_globals_get_metrics): Updated. * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): Updated.
Werner Lemberg 115de713 2013-12-18T16:06:09 [autofit] Minor.
Werner Lemberg 3f91cb33 2013-12-18T12:59:35 [autofit] s/ScriptMetrics/StyleMetrics/.
Werner Lemberg 4fccc214 2013-12-18T12:53:01 [autofit] s/script_{metrics,hints}/style_{metrics,hints}/
Werner Lemberg f4df4079 2013-12-18T10:39:30 [autofit] s/gscripts/gstyles/.
Werner Lemberg 9a354550 2013-12-18T10:36:06 [autofit] s/glyph_scripts/glyph_styles/. This is the first commit of a series to create a new top-level structure (a `style') for handling scripts, writing_systems, and soon-to-be-added coverages.
Werner Lemberg 7a5fc2f3 2013-12-17T13:29:53 [autofit] s/AF_Script_/AF_WritingSystem_/ where appropriate.
Infinality 8bb09b0f 2013-12-11T09:01:13 [truetype] Simplify logic of rendering modes. This patch unifies the subpixel and non-subpixel cases. * src/truetype/ttinterp.h (TT_ExecContextRec): Remove `grayscale_hinting'; all code should refer to `grayscale' instead. Remove unused `native_hinting' member. Rename `subpixel_hinting' member to `subpixel. * src/truetype/ttgload.c (TT_LOADER_SET_PP): Updated. (tt_loader_init): Updated. * src/truetype/ttinterp.c (Ins_GETINFO): Simplify. Updated.
Werner Lemberg 9193259c 2013-12-10T13:24:07 [autofit] s/DFLT/NONE/, s/dflt/none/.
Werner Lemberg 45244f80 2013-12-10T13:18:11 [autofit] s/AF_SCRIPT_NONE/AF_SCRIPT_UNASSIGNED/.
Werner Lemberg 69d1a360 2013-12-10T10:12:27 [truetype] Fix scaling of vertical phantom points. * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and pp4.x also.
Werner Lemberg 7318b1aa 2013-12-10T09:40:36 Formatting.
Werner Lemberg 05c786d9 2013-12-10T08:38:57 [truetype] Fix positioning of composite glyphs. Problem reported by Nigel Tao <nigeltao@golang.org>. * src/truetype/ttgload.c (TT_Hint_Glyph): Remove code that shifts the glyph (component) by a fractional value computed from the LSB phantom point. This is wrong, since the horizontal phantom points get rounded horizontally later on.