[Mono-bugs] [Bug 338207] System.Drawing.Graphics. DrawString does not recognize italic or bold styles.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 31 16:43:45 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=338207#c3





--- Comment #3 from Sebastien Pouliot <spouliot at novell.com>  2007-10-31 14:43:45 MST ---
simpler (to build) test case:

using System;
using System.Drawing;
using System.Windows.Forms;

public class MainForm : Form {

        public MainForm ()
        {
                Paint += new PaintEventHandler (MainForm_Paint);
        }

        void MainForm_Paint (object sender, PaintEventArgs e)
        {
            using (Font f = new Font(FontFamily.GenericSansSerif, 48f,
FontStyle.Italic)) {

                e.Graphics.DrawString ("This is italic test string", f, new
SolidBrush (Color.Black), 10, 10);

            }



            using (Font f = new Font (FontFamily.GenericSansSerif, 36f,
FontStyle.Bold)) {

                e.Graphics.DrawString ("This is bold test string", f, new
SolidBrush (Color.Black), 10, 100);

            }



            using (Font f = new Font (FontFamily.GenericSansSerif, 24f,
FontStyle.Bold | FontStyle.Italic)) {

                e.Graphics.DrawString ("This is bold + italic test string", f,
new SolidBrush (Color.Black), 10, 200);

            }

        }

        [STAThread]
        static void Main ()
        {
                Application.Run (new MainForm ());
        }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list