예제 #1
0
        private void CheckFontStyle(DocxNode node, RunProperties properties)
        {
            string fontSize       = node.ExtractStyleValue(DocxFontStyle.fontSize);
            string textDecoration = node.ExtractStyleValue(DocxFontStyle.textDecoration);

            if (!string.IsNullOrEmpty(fontSize))
            {
                DocxFontStyle.ApplyFontSize(fontSize, properties);
            }

            if (!string.IsNullOrEmpty(textDecoration))
            {
                DocxFontStyle.ApplyTextDecoration(textDecoration, properties);
            }
        }
예제 #2
0
        private void CheckFonts(DocxNode node, RunProperties properties)
        {
            string fontFamily = node.ExtractStyleValue(DocxFontStyle.fontFamily);
            string fontWeight = node.ExtractStyleValue(DocxFontStyle.fontWeight);
            string fontStyle  = node.ExtractStyleValue(DocxFontStyle.fontStyle);

            if (!string.IsNullOrEmpty(fontFamily))
            {
                DocxFontStyle.ApplyFontFamily(fontFamily, properties);
            }

            if (!string.IsNullOrEmpty(fontWeight))
            {
                DocxFontStyle.ApplyFontWeight(fontWeight, properties);
            }

            if (!string.IsNullOrEmpty(fontStyle))
            {
                DocxFontStyle.ApplyFontStyle(fontStyle, properties);
            }
        }