* src/sfnt/ttcmap.c (tt_face_build_cmaps): Remove clang warning.
Fix cppcheck 1.64 warning.

* src/autofit/afglobal.c (af_face_globals_new): Catch NULL pointer
dereference in case of error.
* builds/unix/configure.raw: Don't show error messages of `which'.
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.
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.
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.
CMakeLists.txt: Fix include directories.

Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
CMakeLists.txt: Another fix for include directories.

Problem reported by Taylor Holberton <taylorcholberton@gmail.com>.
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.
Fix Savannah bug #41946.

Based on a patch from Marek Kašík <mkasik@redhat.com>.

* builds/unix/configure.raw (LIBS_CONFIG): Remove.
* builds/unix/freetype-config.in (libs): Hard-code value.
* builds/unix/unix-def.in: Updated.
Fix Savannah bug #38235.

Work around a bug in pkg-config version 0.28 and earlier: If a
variable value gets surrounded by doublequotes (in particular values
for the `prefix' variable), the prefix override mechanism fails.

* builds/unix/freetype2.in: Don't use doublequotes.
* builds/unix/unix-def.in (freetype.pc): Escape spaces in directory
names with backslashes.
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.
[aflatin] Improve comment.
[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.
[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'.
[smooth] Fix stand-alone compilation.

* src/smooth/ftgrays.c (FT_BEGIN_STMNT, FT_END_STMNT): Define.
[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.
[afblue.pl]: Minor improvements.

* src/tools/afblue.pl: Allow whitespace before comments.
Ignore whitespace in strings.
Documentation fix.
Make `FT_Get_SubGlyph_Info' actually work.

* src/base/ftobjs.c (FT_Get_SubGlyph_Info): Return FT_Err_Ok
if there is no error.