Delay freeing of referenced noted after FT_Manager_RemoveFaceID.
Fixes#1401.
* src/cache/ftcmanag.c (FTC_Cache_RemoveFaceID): Mark referenced nodes
for later removal.
* src/cache/ftcmanag.c (FTC_Node_Unref): Free unlinked modes.
==========================
Tag sources with `VER-2-14-2'.
* docs/VERSION.TXT: Add entry for version 2.14.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.14.1/2.14.2/, s/2141/2142/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
* builds/unix/configure.raw (version_info): Set to 26:5:20.
* CMakeLists.txt (VERSION_PATCH): Set to 2.
* src/base/src/base/ftobjs.c (ft_glyphslot_alloc_bitmap): Use preset
dimensions and call FT_MEM_ALLOC_MULT.
* include/freetype/internal/ftobjs.h (ft_glyphslot_alloc_bitmap):
Updated signature...
* src/*: ... and all callers.
Any point on the horizontal or vertical segment, which can either
be either extreme or inflection point is now marked. This makes
separate inflection algorithm unnecessary. This simplifies the
algorithm without noticeable rendering differences.
* src/pshinter/pshalgo.c (psh_glyph_compute_extrema): Rewrite
to detect both extrema and inflection points. Determine the
their direction instantly.
Applying an LCD filter to spans rather than the entire image improves
the performance of ClearType-like rendering by about 40% at 32 ppem
and much more at larger sizes. Small rounding differences are expected.
* src/smooth/ftsmooth.c (ft_smooth_raster_lcd, ft_smooth_lcd_spans,
ft_smooth_raster_lcdv, ft_smooth_lcdv_spans, TOrigin): Implement it.
* include/freetype/internal/ftobjs.h (FT_LibraryRec): lcd_filter_func gone.
* src/base/ftlcdfil.c (ft_lcd_filter_fir): Removed.
(ft_lcd_padding): Use padding sufficient for any 5-tap filter.
(FT_Library_SetLcdFilterWeights, FT_Library_SetLcdFilter): Updated.
* docs/CHANGES: Updated.
This removes the internal face property that sets the filtering weights.
The global filtering algorithms and weights are now optimized to work
well under all conditions.
* include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Do it.
* include/freetype/freetype.h (FT_Face_Properties): Revised docs.
* include/freetype/ftparams.h (FT_PARAM_TAG_LCD_FILTER_WEIGHTS): Ditto.
* src/base/ftlcdfil.c (ft_lcd_padding): Updated.
* src/base/ftobjs.c (ft_open_face_internal, FT_Face_Properties): Ditto.
* src/smooth/ftsmooth.c (ft_smooth_render): Ditto.
* docs/CHANGES: Updated.
This is a better fix for #1384, which is rather about signed overflow.
* include/freetype/ftimage.h (FT_Span): Use unsigned position.
* src/smooth/ftgrays.c (gray_sweep_direct): Sync with FT_Span.
* src/smooth/ftsmooth.c (ft_smooth_render): Remove redundant shift.
* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Readjust limits.
Reject rendering of outlines that stretch beyond 32767 pixels from
the origin, which is further restricted to 10922 horizontal pixels
for LCD rendering with ClearType-like algorithms. 16-bit FT_Span is
one of the reasons to have this limit imposed, fixes#1384.
* src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Impose global
rendering limits.
Many rendering timeouts occur when the outline stretches far beyond
the Em size. Limiting the bounding box to 10 Em should reject such
requests. It is still to possible scribble excessively within the set
limits. At least, the memory usage will be curtained.
* src/base/ftobjs.c (ft_glyphslot_free_bitmap): Revise limits based
on ppem when available.
According to the OpenType specification of the 'cmap' table, the pair (0,6)
for platform and encoding IDs is used for format 13 charmap tables. Commit
ba6f3e18 (from 2017-01-17) introduced the `TT_APPLE_ID_FULL_UNICODE` macro
(i.e., encoding_id == 6, added to OpenType 1.8); however, the corresponding
cmap selection code wasn't updated.
Unicode's Last Resort font (https://github.com/unicode-org/last-resort-font)
can be used to test a format 13 charmap.
Fixes issue #1383.
* src/base/ftobjc.s (find_unicode_charmap): Support
`TT_APPLE_ID_FULL_UNICODE`.
Signed-off-by: Celeste Liu <uwu@coelacanthus.name>