Bug 25958 - investigate matching IE's text-control widths for fonts where the OS/2 table as a non-positive avgCharWidth
Summary: investigate matching IE's text-control widths for fonts where the OS/2 table ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 25566
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-22 02:34 PDT by Ojan Vafai
Modified: 2010-02-12 19:24 PST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2009-05-22 02:34:43 PDT
Once bug 25566 is fixed to use the avgCharWidth in the OS/2 table, we should investigate how IE calculates this value for fonts that have a non-positive (invalid) avgCharWidth in the OS/2 table.

I currently see two options. 

1. Take the arithmetic average from the hmtx table and see how close that gets us to IE's numbers.

2. Use the width of a '0' character as that matches Safari 3 behavior and the fonts with negative OS/2 avgCharWidth values seem to all be Mac fonts.