Bug 131946 - Bounding box is wrong for texts with leading
Summary: Bounding box is wrong for texts with leading
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-21 13:06 PDT by abaldeva
Modified: 2014-04-21 14:17 PDT (History)
0 users

See Also:


Attachments
two sample html reproducing the bugs (74.31 KB, application/octet-stream)
2014-04-21 13:07 PDT, abaldeva
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description abaldeva 2014-04-21 13:06:58 PDT
Hi,

It seems like bounding box for the text is not correct when the text is using a font with high leading value. This can be reproduced in Safari 6.x/7.x on Mac. I have attached two sample cases. In fontleading1.html, you'll find that the accent on the character goes over the border. In the 2nd, the ascent goes beyond the grey background.

Upon my investigation, the WinCairo port does not suffer from this problem. I noted that the TextMetric returned by windows system API returned 0 for external leading and ascent value appeared as if it already included the external leading into it (so turns out to be normal baseline value). I'd also like to note that the Chrome on PC does not exhibit the bug but Chrome on OS X exhibits the same issue. So it could be an issue of system level API. Normally, the external leading on Windows is not included in ascent calculation however seems like it does in case of this particular font (based on watching values in debugger). 

--Arpit
Comment 1 abaldeva 2014-04-21 13:07:46 PDT
Created attachment 229823 [details]
two sample html reproducing the bugs
Comment 2 abaldeva 2014-04-21 14:17:05 PDT
On 2nd thoughts, this appears to be a data bug which Windows API is able to fix internally. 

Marking the bug as invalid.