Skip to content

Commit 90938d6

Browse files
author
ArthurHub
committed
* improve GDI+ text rendering by rounding text position
1 parent 93f3402 commit 90938d6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Source/HtmlRenderer/WinGraphics.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ public void DrawString(String str, Font font, Color color, PointF point, SizeF s
181181
if( _useGdiPlusTextRendering )
182182
{
183183
ReleaseHdc();
184-
_g.DrawString(str, font, RenderUtils.GetSolidBrush(color), point.X - FontsUtils.GetFontLeftPadding(font)*.8f, point.Y);
184+
_g.DrawString(str, font, RenderUtils.GetSolidBrush(color), (int)Math.Round(point.X - FontsUtils.GetFontLeftPadding(font)*.8f), (int)Math.Round(point.Y));
185185
}
186186
else
187187
{
188-
if (color.A == 255)
188+
if( color.A == 255 )
189189
{
190190
SetFont(font);
191191
SetTextColor(color);

0 commit comments

Comments
 (0)