The fixed pool allocation on stack is very fast and works very well
for rendering glyphs smaller than 40 pixels. Larger glyphs have to be
split and rendered piecewise, which is slower. This commit introduces
dynamic pool allocation for larger glyphs. Complex large glyphs are
now rendered about 2x faster.
* src/smooth/ftgrays.c (gray_convert_glyph): Use simpler banding schema
in case of rendering emergency.
(gray_raster_render): Allocate larger pools dynamically.
* src/truetype/ttinterp.c (Compute_Point_Displacement,
Ins_SHP, Ins_SHPIX): Use 'FT_UInt" as point references.
(Ins_SHC, Ins_SHZ): Ditto and simplify repeated condition.
SHZ must shift the zone specified by its arguments. Previously,
it was shifting zp2 instead.
* src/truetype/ttinterp.c (Ins_SHZ): Rewrite to specifications.
Since this font driver is by default enabled in `modules.cfg` and its
availability controlled by `FT_CONFIG_OPTION_HVF`, we need to provide some
stubs so that HVF fonts can be correctly rejected if there is no HVF library
available.
Fixes issue #1409.
* src/hvf/hvfdrv.c (hvf_driver_class): Provide `hvf_face_init` and
`hvf_slot_load_glyph` unconditionally.
* src/hvf/hvfload.c, src/hvf/hvfload.h (hvf_slot_load_glyph)
[!FT_CONFIG_OPTION_HVF]: Define stub.
* src/hvf/hvfobjs.c, src/hvf/hvfobjs.h (hvf_face_init)
[!FT_CONFIG_OPTION_HVF]: Define stub.
The new 'hvf' module is a thin wrapper around 'libhvf' with the necessary
boilerplate stuff to integrate it into FreeType. Note that this currently
works on macOS >= 15.4 and iOS >= 18.4 only.
* include/freetype/tttags.h (TTAG_hvgl, TTAG_hvpm): New macros.
* include/freetype/config/ftmodule.h: Add `hvf_driver_class`.
* include/freetype/internal/fttrace.h: Add tracing tags `hvfdrv`, `hvfobjs`,
and `hvfload`
* include/freetype/internal/services/svfntfmt.h (FT_FONT_FORMAT_HVF): New
macro.
* modules.cfg (FONT_MODULES): Add `hvf` module.
* src/sfnt/sfobjc.s (sfnt_init_face): Handle 'hvgl' table.
* src/hvf/*: New files.
This flag is going to be used to conditionally compile support for Apple's
Hierarchical Variable Font (HVF) format.
* devel/ftoption.h, include/freetype/config/ftoption.h
(FT_CONFIG_OPTION_HVF): New flag.
==========================
Tag sources with `VER-2-14-3'.
* docs/VERSION.TXT: Add entry for version 2.14.3.
* 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.2/2.14.3/, s/2142/2143/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
* builds/unix/configure.raw (version_info): Set to 26:6:20.
* CMakeLists.txt (VERSION_PATCH): Set to 3.
During charstring processing, the `decoder->len_buildchar` field can be
corrupted. Avoid this by caching this value in a local variable at function
entry.
Based on a patch submitted by David Pokora <david.pokora@trailofbits.com>.
Fixes issue #1405.