Ok, i found the error, the antialias that was used in skDrawTextToDC is incorrect.
Try with this
void skDrawTextToDC(IN HDC hDC, IN wstring sTxt, RECT rb, IN long nItem, IN LONG_PTR nStrFormat) {
if (nItem > -1) {
RECTF rcLayout;
LONG_PTR nFontToUse = 0, graphics = 0, nFam = 0, nBrush = 0;
// Create matching font
nFam = g_Child[nItem].PrivateFont;
if (nFam == 0) { GdipCreateFontFamilyFromName(g_Child[nItem].fontName, 0, nFam); }
if (nFam) {
GdipCreateFont(nFam, g_Child[nItem].fontSize, g_Child[nItem].fontStyle, 2, nFontToUse);
if (nFontToUse) {
if (skGetSystemMetrics(SK_OUTER_GLOW)) { BlurTextPlus(hDC, (WCHAR*) sTxt.c_str(), rb, nFontToUse, nStrFormat); }
if (GdipCreateFromHDC(hDC, graphics) == 0) {
rcLayout.left = (float) rb.left;
rcLayout.top = (float) rb.top;
rcLayout.right = (float) rb.right - rb.left;
rcLayout.bottom = (float) rb.bottom - rb.top;
//GdipSetTextRenderingHint(graphics, TextRenderingHintAntiAliasGridFit); // wrong antialias
GdipSetTextRenderingHint(graphics, TextRenderingHintAntiAlias);
if (GdipCreateSolidFill(g_Child[nItem].fontColor, nBrush) == 0) {
GdipDrawString(graphics, sTxt, (long) sTxt.length(), nFontToUse, rcLayout, nStrFormat, nBrush);
GdipDeleteBrush(nBrush);
}
GdipDeleteGraphics(graphics);
}
GdipDeleteFont(nFontToUse); // Delete the font object
}
if (g_Child[nItem].PrivateFont == 0) { GdipDeleteFontFamily(nFam); } // Delete the font family object
}
}
}
Check with this change and tell me how it goes.