Alsing.Globalization.IMEWindow.SetFont C# (CSharp) Method

SetFont() public method

public SetFont ( string fontname, float fontsize ) : void
fontname string
fontsize float
return void
        public void SetFont(string fontname, float fontsize)
        {
            var tFont = new LogFont
                        {
                            lfItalic = 0,
                            lfStrikeOut = 0,
                            lfUnderline = 0,
                            lfWeight = 400,
                            lfWidth = 0,
                            lfHeight = ((int) (-fontsize*1.3333333333333)),
                            lfCharSet = 1,
                            lfPitchAndFamily = (FIXED_PITCH | FF_MODERN),
                            lfFaceName = fontname
                        };

            LogFont lf = tFont;

            NativeMethods.SendMessage(hIMEWnd, (int) WindowMessage.WM_IME_CONTROL, IMC_SETCOMPOSITIONFONT, lf);
        }

Same methods

IMEWindow::SetFont ( Font font ) : void