WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
108145
Italic characters overlaps with normal when set font "Arial"
https://bugs.webkit.org/show_bug.cgi?id=108145
Summary
Italic characters overlaps with normal when set font "Arial"
Chen Zhixiang
Reported
2013-01-28 19:39:21 PST
Test case: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <style> body{ font-family: Arial; } </style> <i>斜体で</i>表示 </body> </html> The `で` overlaps with `表`。IE、Chromium、Opera、QtWebKit,all have this problem.
Attachments
bounding box for italic char may be error?
(7.57 KB, image/png)
2013-01-28 20:57 PST
,
Chen Zhixiang
no flags
Details
Test case
(185 bytes, text/html)
2013-01-30 14:12 PST
,
Dean Jackson
no flags
Details
Italic character should get the text run width an increment
(1.56 KB, application/octet-stream)
2013-01-30 18:29 PST
,
Chen Zhixiang
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Chen Zhixiang
Comment 1
2013-01-28 20:03:07 PST
This problem may relate to the bounding box calculating method of italic characters —— seems it needs to be shifted right a little?
Chen Zhixiang
Comment 2
2013-01-28 20:57:52 PST
Created
attachment 185143
[details]
bounding box for italic char may be error?
Dean Jackson
Comment 3
2013-01-30 14:12:38 PST
Created
attachment 185566
[details]
Test case Works fine on MAC as far as I can tell.
Chen Zhixiang
Comment 4
2013-01-30 18:14:29 PST
I'm debugging this on Windows using Qt-4.8.4, which is not newest WebKit trunk code. However, problem seems still there after checking the code. Modifying the ```setLogicalWidthForTextRun``` function in RenderBlockLineLayout.cpp partly solves this problem, however there is something else I don't considered(it's out of my ability now): 1、italic in vertical-writing? or rtl? 2、italic angle is sloping to left? 3、italic angle is each font-specific? (Currently it's QFontEngine-level in Qt) 4、The text highlight effect is not good I also checked this problem in a iMac laptop, which may be not using the newest WebKit trunk code, —— problem is just there.
Chen Zhixiang
Comment 5
2013-01-30 18:29:28 PST
Created
attachment 185650
[details]
Italic character should get the text run width an increment The font engine calculates italic character's glyph advance_x as normal character, however, if we take the whole text run into consideration, the last italic character will stretch right a little which adds to the text's width. The causes text overlap if the next following character is in normal font.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug