Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/class
diff options
context:
space:
mode:
authorKarl <karl@scowencomputers.co.nz>2018-09-05 08:41:40 +0300
committerKarl <contact@scowencomputers.co.nz>2020-01-13 07:54:00 +0300
commit150d5e209d715b15c68a362f3186a6bc25498e2c (patch)
tree7b5a457abf0ecaf2d0ce2ae1f11338fd49f48f0f /mcs/class
parent24c2e505a3fc5eeaa7e1f2ac2a221cfaded5fe0b (diff)
Round font ascent / descent up in LineTag.
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs
index 0d53610e28e..566ac73ae29 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs
@@ -145,8 +145,8 @@ namespace System.Windows.Forms
height = Font.Height;
XplatUI.GetFontMetrics (Hwnd.GraphicsContext, Font, out ascent, out descent);
float scale_factor = font.GetHeight() / font.FontFamily.GetLineSpacing(font.Style);
- ascent = (int) (ascent * scale_factor);
- descent = (int) (descent * scale_factor);
+ ascent = (int) Math.Ceiling(ascent * scale_factor);
+ descent = (int) Math.Ceiling(descent * scale_factor);
line.recalc = true;
}
}