public void TestScheme() { CT_Font ctFont = new CT_Font(); CT_FontScheme scheme = ctFont.AddNewScheme(); scheme.val = (ST_FontScheme.major); ctFont.SetSchemeArray(0, scheme); XSSFFont font = new XSSFFont(ctFont); Assert.AreEqual(FontScheme.MAJOR, font.GetScheme()); font.SetScheme(FontScheme.NONE); Assert.AreEqual(ST_FontScheme.none, ctFont.GetSchemeArray(0).val); }
private static XSSFFont CreateDefaultFont() { CT_Font ctFont = new CT_Font(); XSSFFont xssfFont = new XSSFFont(ctFont, 0); xssfFont.FontHeightInPoints = (XSSFFont.DEFAULT_FONT_SIZE); xssfFont.Color = (XSSFFont.DEFAULT_FONT_COLOR);//SetTheme xssfFont.FontName = (XSSFFont.DEFAULT_FONT_NAME); xssfFont.SetFamily(FontFamily.SWISS); xssfFont.SetScheme(FontScheme.MINOR); return xssfFont; }