// TODO (DEVSIX-3596) Add support of 'lh' 'ch' units and viewport-relative units private float ParseFontRelativeOrAbsoluteLengthOnMarker(String length) { float value = 0f; if (CssUtils.IsMetricValue(length) || CssUtils.IsNumericValue(length)) { value = CssUtils.ParseAbsoluteLength(length); } else { if (CssUtils.IsFontRelativeValue(length)) { // Defaut font-size is medium value = CssUtils.ParseRelativeValue(length, CssUtils.ParseAbsoluteFontSize(CommonCssConstants.MEDIUM)); // Different browsers process font-relative units for markers differently. // We do it according to the css specification. if (CssUtils.IsRemValue(length)) { ISvgNodeRenderer rootElement = GetSvgRootElement(GetParent()); if (rootElement != null && rootElement.GetAttribute(CommonCssConstants.FONT_SIZE) != null) { value = CssUtils.ParseRelativeValue(length, CssUtils.ParseAbsoluteFontSize(rootElement.GetAttribute(CommonCssConstants .FONT_SIZE))); } } else { if (CssUtils.IsEmValue(length)) { ISvgNodeRenderer parentElement = this.GetParent(); if (parentElement != null && parentElement.GetAttribute(CommonCssConstants.FONT_SIZE) != null) { value = CssUtils.ParseRelativeValue(length, CssUtils.ParseAbsoluteFontSize(parentElement.GetAttribute(CommonCssConstants .FONT_SIZE))); } } else { if (CssUtils.IsExValue(length)) { if (this.GetAttribute(CommonCssConstants.FONT_SIZE) != null) { value = CssUtils.ParseRelativeValue(length, CssUtils.ParseAbsoluteFontSize(this.GetAttribute(CommonCssConstants .FONT_SIZE))); } } } } } } return(value); }