Problem in Ajantha Font using GDIplus on Windows10

  • Thread starter Thread starter Avinash.rt01
  • Start date Start date
A

Avinash.rt01

Guest
I am facing an issue while printing some text using Ajantha Font, My observation says that after ANSI code 127 GDIPlus is not printing the correct font on windows 10 x64, where as GDI (Direct printing on DC does it correctly).

Please help

CFont font;
VERIFY(font.CreateFont(
40, // nHeight
20, // nWidth
0, // nEscapement
0, // nOrientation
FW_DONTCARE, // nWeight
FALSE, // bItalic
FALSE, // bUnderline
FALSE, // cStrikeOut
DEFAULT_CHARSET, // nCharSet
OUT_DEFAULT_PRECIS, // nOutPrecision
CLIP_DEFAULT_PRECIS, // nClipPrecision
DEFAULT_QUALITY, // nQuality
DEFAULT_PITCH, // nPitchAndFamily
_T("AJANTHA"))); // lpszFacename

// Do something with the font just created...
CClientDC cdc(this);
CFont* def_font = cdc.SelectObject(&font);
cdc.TextOut(11, 11, _T("€ € ~ ƒ „ …"), 11);
cdc.SelectObject(def_font);

Font mFont(dc.m_hDC, font);
SolidBrush BlueBrush(Color(255, 0, 0, 255));
graphics.DrawString( strText, -1, &mFont, PointF(0, 150), pStringFormat, &BlueBrush);

// Done with the font. Delete the font object.
font.DeleteObject();

Continue reading...
 
Back
Top