Bug 84461

Summary: [EFL][DRT] SVG Batik test fails to display Chinese characters
Product: WebKit Reporter: Dominik Röttsches (drott) <d-r>
Component: WebKit EFLAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, gyuyoung.kim, lucas.de.marchi, mrobinson, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 86227    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Dominik Röttsches (drott) 2012-04-20 09:44:52 PDT
LayoutTests/svg/batik/text/verticalText.svg looks okay overall, only it doesn't show Chinese characters - font missing?
Comment 1 Chris Dumez 2012-05-09 06:09:39 PDT
This is not in this test only. All the tests that require CJK fonts are failing.
The reason is that there are not CJK fonts in webkitgtkfonts package.

Adding a font like /usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc (for chinese) fixes this test. It is under GNU GPL v2 (http://en.wikipedia.org/wiki/WenQuanYi).
Comment 2 Chris Dumez 2012-05-09 06:17:33 PDT
This is not specific to EFL port by the way, the GTK port has exactly the same issue for this test since it is using the same font.

mrobinson: Is it possible to add fonts (like wqy-zenhei.ttc) to webkitgtkfonts if we notice some test cases require them?
Comment 3 Chris Dumez 2012-05-09 06:47:01 PDT
Created attachment 140932 [details]
Patch

Add WenQuanYi fonts to jhbuild.modules and load them in DRT. Rebaseline EFL expectations for svg/batik/text/verticalText.svg now that Chinese characters are properly displayed.
Comment 4 Chris Dumez 2012-05-09 06:57:52 PDT
Created attachment 140935 [details]
Patch

Regenerate diff with --binary so that PNG result is included.
Comment 5 Chris Dumez 2012-05-09 07:04:54 PDT
Created attachment 140937 [details]
Patch

Fix printed message in case one of the font folders cannot be loaded (Thanks Dominik).
Comment 6 Martin Robinson 2012-05-09 07:31:44 PDT
It's probably better to add this font directly to webkitgtk-test-fonts, indeed.
Comment 7 Chris Dumez 2012-05-09 07:39:58 PDT
Comment on attachment 140937 [details]
Patch

Ok, clearing the flags then.
Comment 8 Chris Dumez 2012-05-09 08:00:08 PDT
I made the following pull request to webkitgtk-fonts:
https://github.com/mrobinson/webkitgtk-test-fonts/pull/3
Comment 9 Chris Dumez 2012-05-10 13:44:09 PDT
Made the following pull request to webkitgtk-fonts instead:
https://github.com/mrobinson/webkitgtk-test-fonts/pull/4

Now using the same fonts as chromium-linux.
Comment 10 Martin Robinson 2012-05-10 15:27:50 PDT
(In reply to comment #9)
> Made the following pull request to webkitgtk-fonts instead:
> https://github.com/mrobinson/webkitgtk-test-fonts/pull/4
> 
> Now using the same fonts as chromium-linux.

Merged and uploaded a new version of the package: https://github.com/downloads/mrobinson/webkitgtk-test-fonts/webkitgtk-test-fonts-0.0.3.tar.gz
Comment 11 Chris Dumez 2012-05-11 01:54:15 PDT
Created attachment 141356 [details]
Patch

Update to webkitgtk-fonts v0.0.3 and rebaseline svg/batik/text/verticalText.svg now that EFL's DumpRenderTree is able to display Chinese characters.
Comment 12 Chris Dumez 2012-05-11 05:29:21 PDT
Addressing this issue on GTK port at Bug 86198.
Comment 13 Raphael Kubo da Costa (:rakuco) 2012-05-11 05:39:28 PDT
Looks fine, thanks for working on this.
Comment 14 WebKit Review Bot 2012-05-11 09:28:06 PDT
Comment on attachment 141356 [details]
Patch

Clearing flags on attachment: 141356

Committed r116776: <http://trac.webkit.org/changeset/116776>
Comment 15 WebKit Review Bot 2012-05-11 09:28:12 PDT
All reviewed patches have been landed.  Closing bug.