コード例 #1
0
        private static XSSFFont CreateDefaultFont()
        {
            XSSFFont xssfFont = new XSSFFont(new CT_Font(), 0);

            xssfFont.FontHeightInPoints = XSSFFont.DEFAULT_FONT_SIZE;
            xssfFont.Color    = XSSFFont.DEFAULT_FONT_COLOR;
            xssfFont.FontName = XSSFFont.DEFAULT_FONT_NAME;
            xssfFont.SetFamily(FontFamily.SWISS);
            xssfFont.SetScheme(FontScheme.MINOR);
            return(xssfFont);
        }
コード例 #2
0
ファイル: StylesTable.cs プロジェクト: zbl960/npoi
        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);
        }
コード例 #3
0
        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);
        }