bugFree UCS Outline Fonts - Bugs: bug #51958, checksums incorrect

 
 

bug #51958: checksums incorrect

Submitted by:  Steve White <Stevan_White>
Submitted on:  Thu 07 Sep 2017 11:44:36 AM UTC  
 
Category: compilationSeverity: 3 - Normal
Item Group: installationStatus: Fix posted
Privacy: PublicAssigned to: Steve White <Stevan_White>
Open/Closed: OpenRelease: development

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 11 Oct 2017 12:45:53 PM UTC, comment #4:

Made the calculaion work for OS/2 table versions 2 through 4, which should do for now. But the solution isn't really satisfactory.

The problem is, this table changes, depending on the value of its first member. So to know how to read it, you have to read part of it.

What's worse, the names of some of the fields change from one version to another -- meaning code that uses the fields has to know about the change and account for it. Very messy.

See https://www.microsoft.com/typography/otspec/os2.htm.

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Wed 11 Oct 2017 11:56:02 AM UTC, comment #3:

The problem with calculating the checksum of the OS/2 table is not the PANOSE field itself. The problem is, there are multiple versions of the whole table, with different sets of fields. The code doesn't account for this.

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Mon 09 Oct 2017 08:35:35 PM UTC, comment #2:

In SVN, fix for 'post' table checksum and overall font checksum.
The checksum calculation for the 'OS/2' table is still faulty.
Problem appears to be in calculating the checksum for the PANOSE field. I'm bewildered -- how can this be so hard?

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Sun 10 Sep 2017 09:27:05 PM UTC, comment #1:

Two steps required:

Each OT table has its checksum, a 32-bit unsigned int, saved in a separate TableRecord.

The font 'head' table has another checksum, calculated by setting its checkSumAdjustment field to 0, calculating a checksum for the whole file, then setting checkSumAdjustment to B1B0AFBA minus the checksum.

https://www.microsoft.com/typography/otspec/otff.htm#otttables

Steve White <Stevan_White>
Project AdministratorIn charge of this item.
Thu 07 Sep 2017 11:44:36 AM UTC, original submission:

FontValidator run on the output files produces these errors:

E0030 Directory Entry checksum error table 'OS/2', calc: 0x3ba6b826, font: 0x3ba6b7a6
E1305 Font checksum is incorrect 0xf3716254

This is because scripts modify fields in the font after it was built.

A solution would be to re-calculate those checksums in the scripts.

Steve White <Stevan_White>
Project AdministratorIn charge of this item.

 

(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 Stevan_White (Submitted the item)
  •  

    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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 11 Oct 2017 12:45:53 PM UTCStevan_WhiteStatusProceeding=>Fix posted
    Mon 09 Oct 2017 08:35:35 PM UTCStevan_WhiteStatusConfirmed=>Proceeding

    Back to the top


    Powered by Savane 3.1-cleanup1