* src/raster/ftraster.c (TProfile): Include the variable array member
and repackage with pointers first.
(New_Profile): Advance the top using the variable array pointer.
These ancient builtins have been supported by clang since 2013. We
condition it somewhat stricter but still around 2017. This is more
portable than `__has_builtin`. Fixes#1260.
* src/raster/ftraster.c (New_Profile): Set important fields only and
delay setting `gProfile` until...
(End_Profile): ... it is checked to be valid here.
(Convert_Glyph): Updated.
This fixes a subtle bug when the last profile in a contour was not
properly short-circuited if it was still empty at `End_Profile`.
We finalize all linking in `Finalize_Profile_List` now and do nothing
else there. The turns are added in `End_Profile`.
* src/raster/ftraster.c (Insert_Y_Turn): Moved up unchanged.
(End_Profile): Take care of turns but set only preliminary linking.
(Finalize_Profile_Table): Take care of linking and null-termination.
(Convert_Glyph): Adjusted accordingly.
* src/raster/ftraster.c (End_Profile): Do not initiate next profile.
(New_Profile): Fully initiate new profile.
(Convert_Glyph): Clean up variables, initialize `fProfile` here.
The general square root calculations are not necessary in FreeType.
For vector normalization or length, FreeType uses special functions.
It is, however, required in the legacy CFF specifications.
* src/base/ftcalc.c (FT_SqrtFixed): New function that uses either
Babylonian or bit-wise algorithm, whichever is faster for the given
situation.
* include/freetype/internal/ftcalc.h (FT_SqrtFixed): Declare it.
When matching the keywords, we avoid calculating their lengths by
checking the stored values. This itself is a sufficient pre-check
before diving into `memcmp`. Therefore, we remove explicit check of
the first characters.
* include/freetype/internal/psaux.h (T1_FieldRec): Store length.
* src/cid/cidload.c (cid_parse_dict): Use `memcmp` and stored length.
* src/type1/t1load.c (parse_dict): Ditto.
* src/type42/t42parse.c (t42_parse_dict): Ditto.
* src/cff/cffobjs.c (remove_style): Rewrite using pointers.
(remove_subset_prefix): Unwrap loop and use `memmove`.
* src/truetype/ttobjs.c (tt_skip_pdffont_random_tag): Unwrap loop
and avoid `strlen`.
This also reduces the used heap size by a large factor.
From Behdad.
* src/autofit/afcjk.h (AF_CJKAxisRec): Use `AF_BLUE_STRINGSET_MAX_LEN`.
* src/autofit/aflatin.h (AF_LatinAxisRec): Ditto.
==========================
Tag sources with `VER-2-13-2'.
* docs/VERSION.TXT: Add entry for version 2.13.2.
* docs/CHANGES: Updated.
* docs/release, docs/README, builds/macs/README: Updated.
* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
builds/windows/visualc/index.html, builds/windows/visualce/index.html,
builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
docs/freetype-config.1: s/2.13.1/2.13.2/, s/2131/2132/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
* builds/unix/configure.raw (version_info): Set to 26:1:20.
* CMakeLists.txt (VERSION_PATCH): Set to 2.