Пример #1
0
            public object GetFontHandle(FontDesc fd)
            {
                Win32Util.LOGFONT lf = new Win32Util.LOGFONT();
                lf.lfFaceName = fd.Family;
                lf.lfHeight   = fd.Size;
                lf.lfItalic   = (byte)(fd.Style & FontStyle.Italic);
                if ((fd.Style & FontStyle.Bold) == FontStyle.Bold)
                {
                    lf.lfWeight = 700;
                }
                lf.lfItalic = (byte)(fd.Style & FontStyle.Underline);

                return(Win32Util.CreateFont(lf));
            }
Пример #2
0
            public object GetFontHandle(FontDesc fd)
            {
                Win32Util.LOGFONT lf=new Win32Util.LOGFONT();
                lf.lfFaceName=fd.Family;
                lf.lfHeight=fd.Size;
                lf.lfItalic=(byte) (fd.Style & FontStyle.Italic);
                if ( (fd.Style & FontStyle.Bold) == FontStyle.Bold )
                    lf.lfWeight=700;
                lf.lfItalic=(byte) (fd.Style & FontStyle.Underline);

                return Win32Util.CreateFont(lf);
            }