Esempio n. 1
0
        public void TestGetFontMetrics()
        {
            FontMetrics fontMetrics = graphics.GetFontMetrics(graphics.GetFont());

            if (graphics.GetFont().toString().indexOf("dialog") != -1 || graphics.GetFont().toString().indexOf("Dialog") != -1) // if dialog is returned we can't run the Test properly.
            {
                return;
            }
            Assert.AreEqual(7, fontMetrics.charWidth('X'));
            Assert.AreEqual("java.awt.Font[family=Arial,name=Arial,style=plain,size=10]", fontMetrics.GetFont().toString());
        }