protected Font GetFont(Style style, StyleInstance styleInstance) { return(this.m_fontCache.GetFont(MappingHelper.GetStyleFontFamily(style, styleInstance, this.GetDefaultFont().Name), MappingHelper.GetStyleFontSize(style, styleInstance), MappingHelper.GetStyleFontStyle(MappingHelper.GetStyleFontStyle(style, styleInstance), MappingHelper.GetStyleFontWeight(style, styleInstance), MappingHelper.GetStyleFontTextDecoration(style, styleInstance)))); }
public Font GetFontFromCache(int id, Style style, StyleInstance styleInstance) { return(this.GetFontFromCache(id, MappingHelper.GetStyleFontFamily(style, styleInstance, this.GetDefaultFont().Name), MappingHelper.GetStyleFontSize(style, styleInstance), MappingHelper.GetStyleFontStyle(style, styleInstance), MappingHelper.GetStyleFontWeight(style, styleInstance), MappingHelper.GetStyleFontTextDecoration(style, styleInstance))); }
public Font GetFontFromCache(int id, string fontFamily, float fontSize, FontStyles fontStyle, FontWeights fontWeight, TextDecorations textDecoration) { return(this.m_fontCache.GetFontFromCache(id, fontFamily, fontSize, MappingHelper.GetStyleFontStyle(fontStyle, fontWeight, textDecoration))); }
public Font GetDefaultFont() { return(this.GetFont(this.m_defaultFontFamily, FontCache.m_defaultFontSize, MappingHelper.GetStyleFontStyle(FontStyles.Normal, FontWeights.Normal, TextDecorations.None))); }
public Font GetFont(Style style, StyleInstance styleInstance, bool hasScope) { if (style == null) { return(this.m_mapMapper.GetDefaultFontFromCache(0)); } string text = MappingHelper.DefaultFontFamily; if (this.m_mapMapper.GetDefaultFont() != null) { text = this.m_mapMapper.GetDefaultFont().Name; } if (!MappingHelper.IsPropertyExpression(style.FontFamily) || hasScope) { text = MappingHelper.GetStyleFontFamily(style, styleInstance, text); } float fontSize = (MappingHelper.IsPropertyExpression(style.FontSize) && !hasScope) ? MappingHelper.DefaultFontSize : MappingHelper.GetStyleFontSize(style, styleInstance); FontStyles fontStyle = (MappingHelper.IsPropertyExpression(style.FontStyle) && !hasScope) ? FontStyles.Normal : MappingHelper.GetStyleFontStyle(style, styleInstance); FontWeights fontWeight = (MappingHelper.IsPropertyExpression(style.FontWeight) && !hasScope) ? FontWeights.Normal : MappingHelper.GetStyleFontWeight(style, styleInstance); TextDecorations textDecoration = (MappingHelper.IsPropertyExpression(style.TextDecoration) && !hasScope) ? TextDecorations.None : MappingHelper.GetStyleFontTextDecoration(style, styleInstance); return(this.m_mapMapper.GetFontFromCache(0, text, fontSize, fontStyle, fontWeight, textDecoration)); }
public static Font GetDefaultFont() { return(new Font(MappingHelper.DefaultFontFamily, MappingHelper.DefaultFontSize, MappingHelper.GetStyleFontStyle(FontStyles.Normal, FontWeights.Normal, TextDecorations.None))); }