Bug 306355 - kwebkit does not render available webfonts
Summary: kwebkit does not render available webfonts
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kwebkitpart
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 1.3.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: webkit-devel
URL: http://www.google.com/webfonts
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-06 15:53 UTC by meyerm
Modified: 2012-09-10 20:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot of google webfonts page (140.92 KB, image/png)
2012-09-07 12:48 UTC, Dawit Alemayehu
Details
screenshot of google's webfont homepage in Konqueror/Rekonq/Arora (427.73 KB, image/jpeg)
2012-09-07 22:53 UTC, meyerm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description meyerm 2012-09-06 15:53:39 UTC
When opening the webfonts directory, KHTML correctly renders the provided webfonts. kwebkitpart on the other hand seems to replace the fonts by a generic sans-serif font. 

Reproducible: Always

Steps to Reproduce:
1. open Google webfont directory
2. scroll through font list
Actual Results:  
All fonts are the same (just different weight and sometimes different size).

Expected Results:  
Several different fonts, just like with KHTML.

Simply switching between the rendering engines via "View->View Mode" makes it easily comparable. So the exact same website is used.
Comment 1 meyerm 2012-09-06 22:18:37 UTC
Still valid for 1.3.0. Updating.
Comment 2 Dawit Alemayehu 2012-09-07 04:18:10 UTC
(In reply to comment #1)
> Still valid for 1.3.0. Updating.

Are you talking about http://www.google.com/webfonts ? If so, then I cannot reproduce the problem here. Otherwise, please provide a link where I can test this.
Comment 3 meyerm 2012-09-07 10:45:16 UTC
Yes, I do. I entered the URL into the form entry "URL where we can see the problem" or so. But perhaps I should have added it into the text. Thank you for asking!

I am using the standard Archlinux packages on x86-64. First I used 1.2.0, since yesterday evening there was an update to 1.3.0. Since KHTML, chromium and firefox show the fonts correctly, I thought that it's not a setup problem with my system. What can I do to debug the font rendering in kwebkitpart?
Comment 4 Dawit Alemayehu 2012-09-07 12:47:48 UTC
(In reply to comment #3)
> Yes, I do. I entered the URL into the form entry "URL where we can see the
> problem" or so. But perhaps I should have added it into the text. Thank you
> for asking!

Ooops. I should have seen that. My fault. Sorry...

> I am using the standard Archlinux packages on x86-64. First I used 1.2.0,
> since yesterday evening there was an update to 1.3.0. Since KHTML, chromium
> and firefox show the fonts correctly, I thought that it's not a setup
> problem with my system. What can I do to debug the font rendering in
> kwebkitpart?

I too use ArchLinux, but I ofcourse compile KDE from source. Can you install and see if other QtWebKit based browser such as Arora or reKonq exhibit the same problem ? I have attached a screenshot that shows what I see at the site.
Comment 5 Dawit Alemayehu 2012-09-07 12:48:28 UTC
Created attachment 73721 [details]
screenshot of google webfonts page
Comment 6 meyerm 2012-09-07 22:53:18 UTC
Created attachment 73731 [details]
screenshot of google's webfont homepage in Konqueror/Rekonq/Arora
Comment 7 meyerm 2012-09-07 22:53:31 UTC
Sure thing. I am attaching a screenshot with Konqueror using webkit in the upper left corner, Konqueror with KHTML in the upper right corner. Rekonq in the lower left and Arora in the lower right corner. As you can see, only KHTML renders the fonts correctly (quite slow, however). Firefox and chromium are also fine.
Comment 8 Dawit Alemayehu 2012-09-08 06:01:02 UTC
(In reply to comment #7)
> Sure thing. I am attaching a screenshot with Konqueror using webkit in the
> upper left corner, Konqueror with KHTML in the upper right corner. Rekonq in
> the lower left and Arora in the lower right corner. As you can see, only
> KHTML renders the fonts correctly (quite slow, however). Firefox and
> chromium are also fine.

Dunno what to tell you. I have stock KDE installed on my machine and I do not observe this issue. Hmm... it could also be because I compile qtwebkit from the qtwebkit-2.3 branch as well. I will try to test is with stock qtwebkit and see if I can replicate your results.
Comment 9 Nikita Skovoroda 2012-09-08 16:03:57 UTC
I can confirm that with Archlinux packages.

It needs some testing, but maybe the webfonts just didn't get enabled at compile-time for qtwebkit (if it works fine on different distrubutions with browsers that are using pure qtwebkit, and does not work on Arch).
Comment 11 Dawit Alemayehu 2012-09-08 16:50:14 UTC
(In reply to comment #10)
> Here is the PKGBUILD:
> http://projects.archlinux.org/svntogit/packages.git/tree/trunk/
> PKGBUILD?h=packages/qtwebkit

Yes, I can replicate this too with the binary packages from ArchLinux repository. No idea why really, but I noticed that the build() rule in the PKGBUILD file simply runs qmake in Source directory to compile qtwebkit. That IMHO is a mistake. It should follow the QtWebKit building rules outlined at http://trac.webkit.org/wiki/BuildingQtOnLinux. Just simply remove "WebKit/" form the build instructions.
Comment 12 Nikita Skovoroda 2012-09-10 14:33:08 UTC
It was done that way some time before.

Can you please check this commit: http://projects.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/qtwebkit&id=fbabfff43280ef87d4bbb0a204b4755b0e06d621 ?

Another question is: do both kwebkitpart *and* plain qtwebkit (like arora or just a plain qtdesigner form) render fonts correcly with other qtwebkit versions except the binary one provided by ArchLinux?
Comment 13 Dawit Alemayehu 2012-09-10 15:30:54 UTC
(In reply to comment #12)
> It was done that way some time before.
> 
> Can you please check this commit:
> http://projects.archlinux.org/svntogit/packages.git/commit/trunk/
> PKGBUILD?h=packages/qtwebkit&id=fbabfff43280ef87d4bbb0a204b4755b0e06d621 ?

Well I cannot help you with that since I won't be able to actually create a qtwebkit package using this PKGBUILD or any for that matter. The machine I am currently using is rather a very very very old Pentium 4 machine and it takes it more than an hour to compile qtwebkit. :(

> Another question is: do both kwebkitpart *and* plain qtwebkit (like arora or
> just a plain qtdesigner form) render fonts correcly with other qtwebkit
> versions except the binary one provided by ArchLinux?

Yes. I tested Arora and with both the binary package from ArchLinux and the one I compiled from source recently. The regression is present in the ArchLinux binary packages only.
Comment 14 Nikita Skovoroda 2012-09-10 16:56:57 UTC
> Yes. I tested Arora and with both the binary package from ArchLinux and the one
 I compiled from source recently. The regression is present in the ArchLinux
 binary packages only.

So, if i got it correct, that's an ArchLinux downstream bug and not a
bug in kwebkit in any way.
Comment 15 Dawit Alemayehu 2012-09-10 17:00:57 UTC
(In reply to comment #14)
> > Yes. I tested Arora and with both the binary package from ArchLinux and the one
>  I compiled from source recently. The regression is present in the ArchLinux
>  binary packages only.
> 
> So, if i got it correct, that's an ArchLinux downstream bug and not a
> bug in kwebkit in any way.

That is correct. It is a downstream bug.
Comment 16 meyerm 2012-09-10 19:55:07 UTC
I built qtwebkit with the patches from Nikita (PKGBUILD version 2.2.2). I had to recalculate the checksums of the patch files from the repository [1] (I guess there were converting errors like \r\n vs \n or something like that) and "Assume -R" on a patch [2]. The package downloads the source for qtwebkit-4.8.2 and installs itsels as 4.9.2 into the system. I used ltrace to verify that rekonq is using this new library. Unfortunately, it still isn't rendering the webfonts.

[1] http://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/qtwebkit
[2] patching file Source/JavaScriptCore/wtf/gtk/ThreadingGtk.cpp
Reversed (or previously applied) patch detected!  Assume -R? [n] y
Comment 17 Nikita Skovoroda 2012-09-10 20:14:59 UTC
But i didn't write or send any patches.
Comment 18 Nikita Skovoroda 2012-09-10 20:18:24 UTC
That's the exact same PKGBUILD that is used by archlinux developers to build the version that is hosted in the repos. If you want to build your own version, you should modify the PKGBUILD to alter the build process according to your needs.

I'll post a bugreport to archlinux bugtracker later today, if there isn't one yet.
Comment 19 meyerm 2012-09-10 20:44:30 UTC
Oh, my bad. I'm sorry - I thought you commited the PKGBUILD you mentioned. :-)

I agree that we could move onto to the archlinux bugtracker, if it isn't an upstream bug. I'll mark the bug as "RESOLVED" with "DOWNSTREAM". Can you post the archlinux bug#?

Thanks to everybody who participated.