This fixes a warning from clang-tidy:
warning: std::move of the variable 'mapping' of the trivially-copyable
type 'AxisValueMap' has no effect [performance-move-const-arg]
* Update hb-serialize.hh
This version does compile with g++ 4.8.3 which is the newest available version on Aix5.3
* Update hb-serialize.hh
Back to the original version, just without `this->`
This minor mismatch is detected by new `-Wcalloc-transposed-args`
`gcc-14` warning as:
In file included from ../src/hb-subset-plan.cc:38:
../src/hb-ot-cff1-table.hh: In member function 'bool OT::cff1::accelerator_t::get_glyph_from_name(const char*, int, hb_codepoint_t*) const':
../src/hb-ot-cff1-table.hh:1419:60: warning: 'void* calloc(size_t, size_t)' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
1419 | names = (hb_sorted_vector_t<gname_t> *) hb_calloc (sizeof (hb_sorted_vector_t<gname_t>), 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from hb-subset-plan.hh:30:0,
from hb-subset-plan.cc:27:
hb-subset-plan.cc: In function 'void _update_instance_metrics_map_from_cff2(hb_subset_plan_t*)':
hb-subset-plan.cc:998:81: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (unlikely (!plan->check_success (font = _get_hb_font_with_variations (plan))))
^
hb.hh:263:25: note: in definition of macro 'unlikely'
#define unlikely(expr) (expr)
^
Fixes: https://github.com/harfbuzz/harfbuzz/issues/4545
Last summer I changed sanitizer->check_struct() to only check
the trailing point of the struct on 64bit machines. This works
mostly because offsets are always positive.
Not anymore. Recently we introduced negative offsets in CFF,
and this was causing sanitize() for such structs pass while
the struct's leading edge was out of range.
Fix that.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64859
Prior to this change overflows to shared nodes were handled by duplicating the link from only a single parent on each iteration. However, I've encountered fonts where there is a large number of parents sharing a single child. Using the prior strategy requires large number of overflow resolution iterations to resolve overflows. This changes shared overflow resolution to duplicate the shared child and re-assign multiple overflowing parents in a single iteration. This reduces total packing size in these cases and allows resolution to complete in far fewer iterations.
There is now a separate library that we build if Cairo support is enabled,
which will also be used to build hb-view, so we:
* Add support in the CMake build files to build libharfbuzz-cairo, if enabled
via HB_HAVE_CAIRO. Move the Cairo detection bits around as a result.
* Generate pkg-config file for libharfbuzz-cairo, and add 'cairo' to
Requires.private.
* Fix building hb-view, which will now depend on libharfbuzz-cairo, so Cairo
support must be explicitly enabled.
* Stop depending automatically on Cairo if HB_BUILD_UTILS is enabled unless
Cairo support is enabled as a result.