From d2888e86eb45076affb05c1e8fdfd07cd0590a7c Mon Sep 17 00:00:00 2001 From: Dmitry Batrak Date: Wed, 25 Jan 2017 19:24:38 +0300 Subject: [PATCH] IDEA-67480 Font baseline is shifted for Consolas font fix for SimpleColoredComponent --- .../src/com/intellij/ui/SimpleColoredComponent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java b/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java index 7d3aef58d60f..5bd4be995a5d 100644 --- a/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java +++ b/platform/platform-api/src/com/intellij/ui/SimpleColoredComponent.java @@ -953,7 +953,7 @@ public class SimpleColoredComponent extends JComponent implements Accessible, Co } public static int getTextBaseLine(@NotNull FontMetrics metrics, final int height) { - return (height - metrics.getHeight()) / 2 + metrics.getAscent(); + return (height - metrics.getHeight()) / 2 + metrics.getAscent() + metrics.getLeading(); // adding leading to ascent, just like in editor } private static void checkCanPaint(Graphics g) {