Пример #1
0
        public string GetFontFace(ThemeFontValues value)
        {
            var face = GetFontType(value)?.Typeface?.Value;

            if (face == null)
            {
                throw new ArgumentException("Not typefaces are associated with this font");
            }
            return(face);
        }
Пример #2
0
        public TextFontType GetFontType(ThemeFontValues value)
        {
            switch (value)
            {
            case ThemeFontValues.MajorAscii: return(Major?.LatinFont);

            case ThemeFontValues.MajorHighAnsi: return(Major?.LatinFont);

            case ThemeFontValues.MajorBidi: return(Major?.ComplexScriptFont);

            case ThemeFontValues.MajorEastAsia: return(Major?.EastAsianFont);

            case ThemeFontValues.MinorAscii: return(Minor?.LatinFont);

            case ThemeFontValues.MinorHighAnsi: return(Minor?.LatinFont);

            case ThemeFontValues.MinorBidi: return(Minor?.ComplexScriptFont);

            case ThemeFontValues.MinorEastAsia: return(Minor?.EastAsianFont);

            default: return(null);
            }
        }