Bug 97067

Summary: [Chromium] SkiaGetGlyphWidthAndExtents() should invert y-axis
Product: WebKit Reporter: Kenichi Ishibashi <bashi>
Component: PlatformAssignee: Kenichi Ishibashi <bashi>
Status: RESOLVED FIXED    
Severity: Normal CC: tony, webkit.review.bot, yutak
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Added comment none

Description Kenichi Ishibashi 2012-09-18 21:34:52 PDT
Skia is y-grows-down, while harfbuzz is set up with y-grows-up when we set scale positive.
We also don't need to call hb_font_set_ppem(). hb-view() don't call it.
Comment 1 Kenichi Ishibashi 2012-09-18 22:09:42 PDT
Created attachment 164658 [details]
Patch
Comment 2 Kenichi Ishibashi 2012-09-18 22:10:57 PDT
Yuta-san, could you rubber-stamp? behdad@ did informal review for this patch.
Comment 3 Yuta Kitamura 2012-09-18 22:27:02 PDT
Comment on attachment 164658 [details]
Patch

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

Code change looks fine. r- for lack of comments for non-obvious code.

> Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp:72
> +        extents->y_bearing = SkiaScalarToHarfbuzzPosition(-skBounds.fTop);

I would like some comments explaining these nagations. Looks hard to understand.
Comment 4 Kenichi Ishibashi 2012-09-18 22:47:46 PDT
Created attachment 164663 [details]
Added comment
Comment 5 Kenichi Ishibashi 2012-09-18 22:48:20 PDT
Comment on attachment 164658 [details]
Patch

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

Thank you for review!

>> Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp:72
>> +        extents->y_bearing = SkiaScalarToHarfbuzzPosition(-skBounds.fTop);
> 
> I would like some comments explaining these nagations. Looks hard to understand.

Done.
Comment 6 Yuta Kitamura 2012-09-18 22:48:51 PDT
Comment on attachment 164663 [details]
Added comment

OK.
Comment 7 Kenichi Ishibashi 2012-09-18 22:51:48 PDT
Comment on attachment 164663 [details]
Added comment

Thanks!
Comment 8 WebKit Review Bot 2012-09-18 23:19:08 PDT
Comment on attachment 164663 [details]
Added comment

Clearing flags on attachment: 164663

Committed r128968: <http://trac.webkit.org/changeset/128968>
Comment 9 WebKit Review Bot 2012-09-18 23:19:10 PDT
All reviewed patches have been landed.  Closing bug.