protected Font GetFont(Style style, StyleInstance styleInstance) { return(m_fontCache.GetFont(MappingHelper.GetStyleFontFamily(style, styleInstance, GetDefaultFont().Name), MappingHelper.GetStyleFontSize(style, styleInstance), MappingHelper.GetStyleFontStyle(MappingHelper.GetStyleFontStyle(style, styleInstance), MappingHelper.GetStyleFontWeight(style, styleInstance), MappingHelper.GetStyleFontTextDecoration(style, styleInstance)))); }
internal Font GetFontFromCache(int id, Style style, StyleInstance styleInstance) { return(GetFontFromCache(id, MappingHelper.GetStyleFontFamily(style, styleInstance, GetDefaultFont().Name), MappingHelper.GetStyleFontSize(style, styleInstance), MappingHelper.GetStyleFontStyle(style, styleInstance), MappingHelper.GetStyleFontWeight(style, styleInstance), MappingHelper.GetStyleFontTextDecoration(style, styleInstance))); }
public Font GetDefaultFont() { return(GetFont(m_defaultFontFamily, m_defaultFontSize, MappingHelper.GetStyleFontStyle(FontStyles.Normal, FontWeights.Normal, TextDecorations.None))); }
internal Font GetFontFromCache(int id, string fontFamily, float fontSize, FontStyles fontStyle, FontWeights fontWeight, TextDecorations textDecoration) { return(m_fontCache.GetFontFromCache(id, fontFamily, fontSize, MappingHelper.GetStyleFontStyle(fontStyle, fontWeight, textDecoration))); }
internal Font GetFont(Style style, StyleInstance styleInstance, bool hasScope) { if (style == null) { return(m_mapMapper.GetDefaultFontFromCache(0)); } string text = MappingHelper.DefaultFontFamily; if (m_mapMapper.GetDefaultFont() != null) { text = 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(m_mapMapper.GetFontFromCache(0, text, fontSize, fontStyle, fontWeight, textDecoration)); }