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

 
 

bug #50170: Handle HVAR without widthMap

Submitted by:  Sascha Brawer <saschabrawer>
Submitted on:  Sat 28 Jan 2017 02:06:30 PM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.8

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 01 Feb 2017 07:49:19 AM UTC, comment #3:

Thank you, Werner!

Fix confirmed: https://raw.githack.com/unicode-org/text-rendering-tests/master/reports/FreeStack.html#HVAR-1

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>
Project AdministratorIn charge of this item.
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.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 Feb 2017 09:06:18 AM UTCwlPlanned Release2.7.1=>2.8
    Wed 01 Feb 2017 09:44:00 AM UTCwlStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.7.1
    Sat 28 Jan 2017 02:56:00 PM UTCwlStatusNone=>Need Info
      Assigned toNone=>wl
    Sat 28 Jan 2017 02:06:30 PM UTCsaschabrawerCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1