public UiThemeFont GetFont(UIThemeFontType type) { var font = fonts[type]; if (font == null) { throw new Exception($"font type ${type} is undefined for theme"); } return(font); }
public void SetFontType(UIThemeFontType aFontType) { fontType = aFontType; var themeFont = theme.GetFont(fontType); text.font = themeFont.font; text.lineSpacing = themeFont.spacing; text.fontSize = themeFont.size; text.text = themeFont.isCaps ? value.ToUpper() : value; }