Skip to content
This repository was archived by the owner on Feb 13, 2026. It is now read-only.
This repository was archived by the owner on Feb 13, 2026. It is now read-only.

FontView uses default font widths if HVAR table does not have a width mapping table. #17

@readroberts

Description

@readroberts

FontView uses default font widths if HVAR table does not have a width mapping table. ttgxvar.c::ft_var_load_hvar() seems to survive loading the table, and reasonably sets face->blend->hvar_table->widthMap.mapCount to 0.

However, tt_hadvance_adjust() at line 807 then does the check:
if ( gindex >= face->blend->hvar_table->widthMap.mapCount )
{
FT_TRACE2(( "gindex %d out of range\n", gindex ));
error = FT_THROW( Invalid_Argument );
goto Exit;
}

The width mapping table is optional in the HVAR table; and the Adobe Type group now has two test fonts which show this issue.

By the way I am not familiar with the gyp build system. What is the simplest way to get a debug build, non-optimized and with all symbols? Debugging the regular build with lldb was a bit challenging. Do I edit 'common.gypi' or edit build.py so that args.release is set to '', or something else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions