Safari miscalculates font metrics for web fonts?

Originator:dgatwood42
Number:rdar://16464443 Date Originated:3/28/2014
Status:Closed (fixed) Resolved:17-Oct-2014 09:07 AM
Product:Safari Product Version:6.1.2
Classification:UI/Usability Reproducible:Always
 
Summary:
Apparently, Safari's font metrics behave subtly differently when using fonts loaded by URL and fonts loaded locally.  The attached bug sample demonstrates the problem.

Steps to Reproduce:
1.  Install the two OTF fonts from the attached ZIP file (double-click and then click "Install" in Font Book).
2.  Open the attached HTML file.
3.  Examine the span using the web inspector.  Note that it is 39 pixels wide, which is consistent with what the font's metrics say it should be.
4.  Remove "local('Telegraph Hill')," from the two font declarations.
5.  Refresh the page.
6.  Re-examine the span.  Note that it is now 40 pixels wide.


Expected Results:
I expected a font to render identically whether loaded locally or via a URL.

Actual Results:
The width of the box changes.

Version:
Safari 6.1.2, OS X v10.8.5.


Notes:


Configuration:


Attachments:
'SafariFontBug.zip' was successfully uploaded.



====

For another, more problematic example, compare the rendering of the section-style (small) drop cap "O" at the bottom against the same content rendered in FireFox, Chrome, Kindle, etc.  Notice that the margin is larger on Safari by a couple of pixels.  This almost certainly has iBooks impact.

OpenRadar Note: Example on the web at http://www.gatwood.net/mozbug/ (the naming is because I also found non-deterministic rendering behavior in Firefox—see Bugzilla #989686).  You'll have to add the "local" part yourself, because I nuked it everywhere.  In hindsight, I should probably put it back....

Comments

Fixed in 10.10

Fixed in OS X v.10.10.

By dgatwood42 at March 14, 2015, 4:09 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!