mirror of
https://github.com/freetype/freetype.git
synced 2026-10-23 11:08:54 +03:00
Static VARC fonts can have private variation axes without an 'fvar' table or public MM metadata. Use the blend's axis count when validating 'avar' and item variation stores, avoiding a null 'mmvar' dereference when loading HVAR or VVAR for a VARC component. * src/truetype/ttgxvar.c (ft_var_load_avar, tt_var_load_item_variation_store): Use blend->num_axis. * tests/varc/make-hvvar-fonts.py: Generate HVAR and VVAR fixtures from the static VARC/gvar font using only Python's standard library. * tests/meson.build: Generate the fixtures and pass them to the VARC test. * tests/varc/main.c (test_font, main): Test generated fixture paths. Tests: all five Meson regression tests pass. Fixes issue #1474. Assisted-by: OpenAI Codex
Unit and regression tests for the FreeType library
Quick Start
Download test fonts
Run the tests/scripts/download-test-fonts.py script, which will
download test fonts to the tests/data/ directory first.
Build the test programs
The tests are only built with the Meson build system, and are disabled by default, enable the 'tests' option to compile them, as in:
meson setup out -Dtests=enabled meson compile -C out
Run the test programs
meson test -C out