bugThe FreeType Project - Bugs: bug #50170, Handle HVAR without widthMap

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #50170: Handle HVAR without widthMap

Submitter:  Sascha Brawer <saschabrawer>
Submitted:  Sat 28 Jan 2017 02:06:30 PM UTC
   
 
Severity:  3 - Normal Item Group:  Incorrect behaviour
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.8

Wed 01 Feb 2017 07:49:19 AM UTC, comment #3: 
Sascha Brawer <saschabrawer>
Tue 31 Jan 2017 03:01:30 PM UTC, comment #2: 

I tried to verify but https://savannah.nongnu.org/bugs/?50196, which is probably unrelated, prevented me from testing. In the meantime, Adobe  built a test font that has an HVAR table without a widthMap: https://github.com/unicode-org/text-rendering-tests/blob/master/fonts/TestHVAROne.otf?raw=true

Sascha Brawer <saschabrawer>
Sat 28 Jan 2017 02:56:00 PM UTC, comment #1: 

Please test with the current git of FreeType!  I believe this has been fixed already.

Werner LEMBERG <wl>
Group administrator
Sat 28 Jan 2017 02:06:30 PM UTC, original submission:  

From Read Roberts (cc’ed) in https://github.com/googlei18n/fontview/issues/17:

[FreeType] 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.

Sascha Brawer <saschabrawer>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by saschabrawer (Submitted the item)
  • -email is unavailable- added by saschabrawer (Read Roberts)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-20 wl Planned Release2.7.1 2.8
    2017-02-01 wl StatusNeed Info Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.7.1
    2017-01-28 wl StatusNone Need Info
        Assigned toNone wl
    2017-01-28 saschabrawer Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code