[Webkit-unassigned] [Bug 16768] Position and thickness of underline as text size changes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 23 01:35:04 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=16768


yusukes at chromium.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ojan at chromium.org,
                   |                            |jshin at chromium.org,
                   |                            |yusukes at chromium.org




------- Comment #4 from yusukes at chromium.org  2009-06-23 01:35 PDT -------
This issue is also tracked in Chromium as http://crbug.com/3715 and
http://crbug.com/13602.

I've created a patch which fixes this issue by extracting a proper underline
position and thickness in OpenType table and uses them inside the renderer.

> at small font sizes the WebKit approach looks nicer to me
> as there is not a large gap between the text and the underline like there is in
> Firefox and Opera.

For CJK pages, current underlining algorithm in
renderer/Inline{Flow,Text}Box.cpp seems not so good even at small font sizes.
This is an example. 

http://chromium.googlecode.com/issues/attachment?aid=-4813356322599644233&name=Japanese_small_MSPGothic_before.jpg
http://chromium.googlecode.com/issues/attachment?aid=-458069664526333573&name=Japanese_small_MSPGothic_after.jpg
(after applying my patch)
http://chromium.googlecode.com/issues/attachment?aid=-6748582343719241567&name=Japanese_small_Meiryo_before.jpg
http://chromium.googlecode.com/issues/attachment?aid=-4540227136271297334&name=Japanese_small_Meiryo_after.jpg

As you can see, underlines touch some Japanese glyphs. It's ugly and even hard
to read sometimes. Though I used Chromium trunk for Windows in the screenshot,
Safari 4 for Windows seems to have the same problem.

> At larger font sizes, WebKits approach does not look so good.

Yes, for larger fonts, most browsers (Safari Mac/Win and Chromium Win, at
least) don't look so good as Mark mentioned. For Latin fonts, underline is too
thin (I think this may cause accessibility problems), and for CJK fonts, in
addition to that, the underline position is too high and touches most glyphs.

There are some examples too:
http://chromium.googlecode.com/issues/attachment?aid=-7537620041365127775&name=Chinese_large_defaultfont-arial_before.jpg
http://chromium.googlecode.com/issues/attachment?aid=-2218771908825657487&name=Chinese_large_defaultfont-arial_after.jpg
http://chromium.googlecode.com/issues/attachment?aid=-6827476323788836657&name=Japanese_large_Meiryo_before.jpg
http://chromium.googlecode.com/issues/attachment?aid=2117039701562505555&name=Japanese_large_Meiryo_after.jpg

Could someone review this? Though attached patch is only for Chromium, I'll
modify Safari implementations of SimpleFontData if necessary.

Thanks.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list