Title: [128968] trunk/Source/WebCore
- Revision
- 128968
- Author
- [email protected]
- Date
- 2012-09-18 23:19:31 -0700 (Tue, 18 Sep 2012)
Log Message
[Chromium] SkiaGetGlyphWidthAndExtents() should invert y-axis
https://bugs.webkit.org/show_bug.cgi?id=97067
Reviewed by Yuta Kitamura.
Invert skBounds.fTop and skBounds.height(). Don't call hb_font_set_ppem().
No new tests. Arabic shadda (U+0651) should be placed more higher when Arabic lam (U+0644) follows it.
Tests under svg/W3C-I18N contain such sequences so these tests cover this change.
* platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp:
(WebCore::SkiaGetGlyphWidthAndExtents):
(WebCore::HarfBuzzNGFace::createFont):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (128967 => 128968)
--- trunk/Source/WebCore/ChangeLog 2012-09-19 05:57:40 UTC (rev 128967)
+++ trunk/Source/WebCore/ChangeLog 2012-09-19 06:19:31 UTC (rev 128968)
@@ -1,5 +1,21 @@
2012-09-18 Kenichi Ishibashi <[email protected]>
+ [Chromium] SkiaGetGlyphWidthAndExtents() should invert y-axis
+ https://bugs.webkit.org/show_bug.cgi?id=97067
+
+ Reviewed by Yuta Kitamura.
+
+ Invert skBounds.fTop and skBounds.height(). Don't call hb_font_set_ppem().
+
+ No new tests. Arabic shadda (U+0651) should be placed more higher when Arabic lam (U+0644) follows it.
+ Tests under svg/W3C-I18N contain such sequences so these tests cover this change.
+
+ * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp:
+ (WebCore::SkiaGetGlyphWidthAndExtents):
+ (WebCore::HarfBuzzNGFace::createFont):
+
+2012-09-18 Kenichi Ishibashi <[email protected]>
+
[Chromium] Don't treat tab as spaces for word-end in HarfBuzzShaper
https://bugs.webkit.org/show_bug.cgi?id=97068
Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp (128967 => 128968)
--- trunk/Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp 2012-09-19 05:57:40 UTC (rev 128967)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/ng/HarfBuzzNGFaceSkia.cpp 2012-09-19 06:19:31 UTC (rev 128968)
@@ -68,11 +68,11 @@
if (width)
*width = SkiaScalarToHarfbuzzPosition(skWidth);
if (extents) {
+ // Invert y-axis because Skia is y-grows-down but we set up harfbuzz to be y-grows-up.
extents->x_bearing = SkiaScalarToHarfbuzzPosition(skBounds.fLeft);
- // The extents are unused in harfbuzz now so we're unsure whether a negation is needed here. Revisit when we're sure.
- extents->y_bearing = SkiaScalarToHarfbuzzPosition(skBounds.fTop);
+ extents->y_bearing = SkiaScalarToHarfbuzzPosition(-skBounds.fTop);
extents->width = SkiaScalarToHarfbuzzPosition(skBounds.width());
- extents->height = SkiaScalarToHarfbuzzPosition(skBounds.height());
+ extents->height = SkiaScalarToHarfbuzzPosition(-skBounds.height());
}
}
@@ -171,8 +171,6 @@
m_platformData->setupPaint(paint);
hb_font_set_funcs(font, harfbuzzSkiaGetFontFuncs(), paint, destroyPaint);
float size = m_platformData->size();
- if (floorf(size) == size)
- hb_font_set_ppem(font, size, size);
int scale = SkiaScalarToHarfbuzzPosition(size);
hb_font_set_scale(font, scale, scale);
hb_font_make_immutable(font);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes