By resetting the blend as implemented with this commit fonts with
invalid `gvar' tables may keep calling into `ft_var_load_gvar' from
`tt_set_mm_blend' and failing, but the font was invalid anyway and
we want to keep seeing the failure in `tt_set_mm_blend'.
* src/truetype/ttgxvar.c (ft_var_load_gvar): Calculate length of
offset array once.
Allocate arrays after `FT_FRAME_ENTER' (extra check before
allocating and avoid needing to free array later if error entering
frame).
Always call `FT_FRAME_EXIT'.
Consistently set counts immediately after array initialized.
Reset the blend (particularly `blend->glyphoffsets') on failure.
This change is required to support docwriter 1.2.1.
See
https://github.com/freetype/docwriter/issues/36
for more information.
* docs/markdown/stylesheets/extra.css:
(.md-typeset code) -> (.md-typeset pre>code)
(pre) -> (pre>code)
(p, .md-typeset p, h4): Remove commented styles.
(table.index): Remove unused styles.
* src/truetype/ttgxvar.c (ft_var_load_gvar): Delay settings of any
`blend->xxxcount' values until the corresponding data has been
checked.
Also do some sanitizing to avoid a too early exit.
(TT_Vary_Apply_Glyph_Deltas): Improve tracing message.
* builds/unix/configure.raw, CMakeLists.txt: Request HarfBuzz 1.8.0
or newer.
We are going to add auto-hinter support for Hanifi Rohingya, which
was introduced in Unicode 11.0.
* src/base/ftpsprop.c (ps_property_set) [hinting-engine]: Avoid an
incorrect return value that caused a warning. The function did the
right thing, though.
Creating the API Reference in the (new) `reference' sub-directory is
consistent with other documentation sub-topics, such as `design',
`glyphs' and `tutorial'.
This patch fixes broken hyperlinks in the documentation pointing to
and from the API Reference. It also allows web assets to load from
their relative paths.
* builds/freetype.mk (DOC_DIR): Adjust.
(refdoc, refdoc-venv): Add `--site' argument.
* builds/toplevel.mk (do-dist): Updated.
* src/base/ftoutln.c (FT_Outline_Transform): Bail on empty points.
* src/cff/cffload.c (cff_subfont_load): Use `FT_OFFSET'.
* src/psaux/psft.c (cf2_decoder_parse_substrings): Early out if
`charstring_base' or `charstring_len' are null.
* src/sfnt/ttload.c (tt_face_load_name): Use `FT_OFFSET'.
* src/base/ftgloadr.c (FT_GlyphLoader_Adjust_Points,
FT_GlyphLoader_Adjust_Subglyphs): Use `FT_OFFSET'.
(FT_GlyphLoader_CreateExtra): Add short cut if some values are zero.
Use this for `base + offset' pointer calculations where `base' can
be NULL (triggering a sanitizer warning even if the resulting
pointer gets never dereferenced since it is undefined behaviour
in C).
Suggested by Ben Wagner.
Also reduce number of SFNT table lookups.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18065
* include/freetype/internal/wofftypes.h (WOFF2_InfoRec): Add fields
`glyf_table', `loca_table', and `head_table'.
* src/sfnt/sfwoff2.c (reconstruct_glyf): Update signature.
Use table pointers in `info' parameter.
(get_x_mins): Check `maxp_table'
Use table pointers in `info' parameter.
(reconstruct_font): Use and set table pointers in `info' parameter.
Fix check for `glyf' and `loca' tables.
Update call to `reconstruct_glyf'.
(woff2_open_font): Updated.
* include/freetype/internal/ftmemory.h (FT_MEM_FREE): Use
`FT_DEBUG_INNER' to set source code file name and line.
* src/base/ftdbgmem.c (ft_mem_table_remove): Better formatting of
tracing message.