Bug 117726

Summary: Synthesized vertical italics on rotated glyphs are transformed incorrectly
Product: WebKit Reporter: Dean Jackson <dino>
Component: TextAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-ews
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Test Case
none
Patch
none
Patch none

Description Dean Jackson 2013-06-17 22:38:07 PDT
Created attachment 204882 [details]
Test Case

See the testcase. If a document is using vertical layout, and italics, and using a font that does not provide italic glyphs, then the synthesis of italics skews in the wrong direction.

<rdar://problem/12783606>
Comment 1 Dean Jackson 2013-06-17 22:49:31 PDT
Created attachment 204883 [details]
Patch
Comment 2 Early Warning System Bot 2013-06-17 22:57:36 PDT
Comment on attachment 204883 [details]
Patch

Attachment 204883 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/937247
Comment 3 Early Warning System Bot 2013-06-17 22:59:23 PDT
Comment on attachment 204883 [details]
Patch

Attachment 204883 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/884197
Comment 4 Eric Carlson 2013-06-18 07:52:42 PDT
Comment on attachment 204883 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=204883&action=review

> Source/WebCore/platform/graphics/FontGlyphs.cpp:207
> +    RefPtr<SimpleFontData> nonItalicFontData = data.fontData->nonSyntheticItalicFontData();
> +    GlyphPageTreeNode* nonItalicNode = GlyphPageTreeNode::getRootChild(nonItalicFontData.get(), pageNumber);
> +    GlyphPage* nonItalicPage = nonItalicNode->page();

Nit: these aren't used if page is NULL.
Comment 5 Dean Jackson 2013-06-18 10:05:33 PDT
(In reply to comment #4)
> (From update of attachment 204883 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=204883&action=review
> 
> > Source/WebCore/platform/graphics/FontGlyphs.cpp:207
> > +    RefPtr<SimpleFontData> nonItalicFontData = data.fontData->nonSyntheticItalicFontData();
> > +    GlyphPageTreeNode* nonItalicNode = GlyphPageTreeNode::getRootChild(nonItalicFontData.get(), pageNumber);
> > +    GlyphPage* nonItalicPage = nonItalicNode->page();
> 
> Nit: these aren't used if page is NULL.

That was a typo. It should have been if (nonItalicPage).

Thanks for noticing!
Comment 6 Enrica Casucci 2013-06-18 10:53:30 PDT
Comment on attachment 204883 [details]
Patch

Looks good to me, with the change Eric pointed out. I trust you to fix the 2 qt builds before landing the patch.
Comment 7 Dean Jackson 2013-06-18 12:40:25 PDT
Created attachment 204932 [details]
Patch
Comment 8 Dean Jackson 2013-06-18 13:30:33 PDT
Committed r151693: <http://trac.webkit.org/changeset/151693>