Exemple #1
0
        private FontSuperScript GetFontSuperScript(FontScriptStyle scriptStyle)
        {
            switch (scriptStyle)
            {
            case FontScriptStyle.None:
                return(FontSuperScript.None);

            case FontScriptStyle.Superscript:
                return(FontSuperScript.Super);

            case FontScriptStyle.Subscript:
                return(FontSuperScript.Sub);

            default:
                throw new ArgumentOutOfRangeException(nameof(scriptStyle));
            }
        }
Exemple #2
0
        private VerticalAlignmentRunValues GetFontSuperScript(FontScriptStyle scriptStyle)
        {
            switch (scriptStyle)
            {
            case FontScriptStyle.None:
                return(VerticalAlignmentRunValues.Baseline);

            case FontScriptStyle.Superscript:
                return(VerticalAlignmentRunValues.Superscript);

            case FontScriptStyle.Subscript:
                return(VerticalAlignmentRunValues.Subscript);

            default:
                throw new ArgumentOutOfRangeException(nameof(scriptStyle));
            }
        }