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));
        }