Bug 20358 - [Gtk] font-variant: small-caps; is not working with libwebkit-1.0-1
Summary: [Gtk] font-variant: small-caps; is not working with libwebkit-1.0-1
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2008-08-12 04:54 PDT by Jelle de Jong
Modified: 2009-02-26 08:15 PST (History)
3 users (show)

See Also:


Attachments
image of issue (66.77 KB, image/png)
2008-08-12 04:57 PDT, Jelle de Jong
no flags Details
image of issue (75.08 KB, image/png)
2008-08-12 04:57 PDT, Jelle de Jong
no flags Details
possible fix (1.88 KB, patch)
2009-02-12 10:25 PST, Jonathon Jongsma (jonner)
zecke: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jelle de Jong 2008-08-12 04:54:04 PDT
I first when to the #webkit-gtk IRC channel to confirm the issue and got some good help from somebody there this person has a few days old build of webkit and experienced the same problem, so i am reporting this.

This is an example website that has the problem in its main title and menu's:
http://www.powercraft.nl/testing/

I am using debian sid and used midori for testing webkit

Package: libwebkit-1.0-1
Architecture: i386
Source: webkit
Version: 1.0.1-2
Comment 1 Jelle de Jong 2008-08-12 04:57:23 PDT
Created attachment 22746 [details]
image of issue
Comment 2 Jelle de Jong 2008-08-12 04:57:39 PDT
Created attachment 22747 [details]
image of issue
Comment 3 Jelle de Jong 2008-08-12 05:00:31 PDT
The first attachment is with webkit (midori) the second is with gecko (firefox) as you can see there is no small-caps with webkit.
Comment 4 Jonathon Jongsma (jonner) 2009-02-12 10:25:07 PST
Created attachment 27607 [details]
possible fix
Comment 5 Jonathon Jongsma (jonner) 2009-02-20 19:25:12 PST
Comment on attachment 27607 [details]
possible fix

oops, forgot to mark for review
Comment 6 Holger Freyther 2009-02-25 18:46:30 PST
Comment on attachment 27607 [details]
possible fix


> -        desc.setSpecifiedSize(0.70f*fontDescription.computedSize());
> +        desc.setComputedSize(0.70f*fontDescription.computedSize());
           const FontPlatformData* pdata = new FontPlatformData(desc, desc.family().family());

Cool, what is completely missing from the ChangeLog is the answer to the question why this is the right fix. The FontPlatformData c'tor will use the computedPixelSize of the FontDescription so we will have to set the ComputedSize (like your patch does) and it also makes this statement look symmetric... (just scaling..). Taking a look at Mac and Win there might be more work ahead for custom fonts. I don't have a test case handy but we should be able to locate one.
Comment 7 Holger Freyther 2009-02-26 08:15:43 PST
Landed in r41246.