summaryrefslogtreecommitdiffstats
path: root/ui/gfx/render_text_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gfx/render_text_linux.cc')
-rw-r--r--ui/gfx/render_text_linux.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/gfx/render_text_linux.cc b/ui/gfx/render_text_linux.cc
index f5c3a9b..e411cd9 100644
--- a/ui/gfx/render_text_linux.cc
+++ b/ui/gfx/render_text_linux.cc
@@ -359,7 +359,10 @@ void RenderTextLinux::SetupPangoAttributes(PangoLayout* layout) {
void RenderTextLinux::DrawVisualText(Canvas* canvas) {
DCHECK(layout_);
- Point offset(GetOriginForSkiaDrawing());
+ Point offset(GetOriginForDrawing());
+ // Skia will draw glyphs with respect to the baseline.
+ offset.Offset(0, PANGO_PIXELS(pango_layout_get_baseline(layout_)));
+
SkScalar x = SkIntToScalar(offset.x());
SkScalar y = SkIntToScalar(offset.y());