Opened 14 years ago

Closed 11 years ago

#7053 closed bug (fixed)

non-visible text on websites due to lack of support for the CSS text-rendering: optimizeLegibility

Reported by: mmadia Owned by: leavengood
Priority: high Milestone: R1
Component: Applications/WebPositive Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #9336
Platform: All

Description (last modified by mmadia)

hrev580 of Web+ in R1 Alpha 3.

WebPositive will not display any of the text on

Oddly the invisible text on those sites can be copy/pasted into StyledEdit -- so the characters are there, just not visible.

Change History (12)

comment:1 by mmadia, 14 years ago

Description: modified (diff)
Summary: Non-rendered text of websitenon-visible text on websites

comment:2 by DaaT, 14 years ago

Same thing happens in rev 577 (saw it in www.xda-developers.com)

comment:3 by mmadia, 13 years ago

Blocking: 7799 added

(In #7799) Duplicate of #7053. Updated that ticket description to include the mupdf.com URL.

comment:3 by mmadia, 13 years ago

Blocking: 7799 removed
Description: modified (diff)

comment:4 by ribbonz, 13 years ago

The mupdf.com page uses a stylesheet that includes the following designation at the top

body { text-rendering: optimizeLegibility; }

Change this to body {} (i.e. remove the tag) and it displays properly.

Same with the xda-developers.com site. Tthis one has a bunch of tags defined in the body{} -- just remove the "text-rendering: optimizeLegibility; " and it displays properly.

Same with the creativecommons.org site

This one was harder to check because it uses several .css files and some javascript files -- so I went into Windows and did a 'Save As Web Page' with Chrome and then copied the files back into my Haiku partition and edited the style.css file to remove the "text-rendering: optimizeLegibility;" part. The local copy then displayed properly.

In all three cases, it was the "text-rendering: optimizeLegibility;" tag that messed things up. Remove it, and the pages display perfectly fine in WebPositive.

comment:5 by leavengood, 13 years ago

Owner: changed from stippi to leavengood
Status: newassigned

Thanks for taking the time to do that debugging ribbonz, it really helped me find this faster.

Basically we don't draw this text because our port does not implement various "complex text" methods in WebKit. Specifically Font::floatWidthForComplexText() is called when this optimizeLegibility CSS rule is defined, but our unimplemented version just returns 0. I think after that WebKit gives up rendering the text.

I'm not sure how quickly I can properly implement these methods, but I suspect we could get by with at least implementing something basic.

Funnily enough, our port is not the only one suffering from this. In certain cases Chrome won't render text with this property defined, and like us, webOS won't render text at all!

http://www.aestheticallyloyal.com/public/optimize-legibility/

In that sense I think WebKit screwed up when implementing this and should have better handled ports not implementing these functions. Of course they may have fixed this problem since then but our port has not been updated in a very long time.

For now I think I'll continue working on updating our port and let this issue stand by for now. But at least we now know why it happens.

comment:6 by leavengood, 13 years ago

Summary: non-visible text on websitesnon-visible text on websites due to lack of support for the CSS text-rendering: optimizeLegibility

comment:7 by khallebal, 13 years ago

i guess web+ has the same rendering problem with arabic text see ticket #6352, the links do work but they 're not displayed along with plain text.

comment:8 by aldeck, 12 years ago

Priority: normalhigh

comment:9 by mmadia, 12 years ago

Description: modified (diff)

comment:10 by mmadia, 12 years ago

Blocking: 9336 added

comment:11 by pulkomandy, 11 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.