void InitFont(string fontName, int emHeight) { Win32.MyWin32.LOGFONT logFont = new Win32.MyWin32.LOGFONT(); Win32.MyWin32.SetFontName(ref logFont, fontName); logFont.lfHeight = emHeight; logFont.lfCharSet = 1;//default logFont.lfQuality = 0;//default hfont = Win32.MyWin32.CreateFontIndirect(ref logFont); Win32.MyWin32.SelectObject(memdc.DC, hfont); }
void InitFont(string fontName, int emHeight) { Win32.MyWin32.LOGFONT logFont = new Win32.MyWin32.LOGFONT(); Win32.MyWin32.SetFontName(ref logFont, fontName); logFont.lfHeight = emHeight; logFont.lfCharSet = 1; //default logFont.lfQuality = 0; //default hfont = Win32.MyWin32.CreateFontIndirect(ref logFont); Win32.MyWin32.SelectObject(memdc.DC, hfont); }