protected virtual void GetGraphicsPath(ref PointF ctp) { gp = new GraphicsPath(); if (this is SvgTextPositioningElement) { SvgTextPositioningElement tpElm = (SvgTextPositioningElement)this; ctp = this.GetCurrentTextPosition(tpElm, ctp); } string sBaselineShift = GetPropertyValue("baseline-shift").Trim(); double shiftBy = 0; if (sBaselineShift.Length > 0) { SvgTextElement textElement = this as SvgTextElement; if (textElement == null) { textElement = (SvgTextElement)this.SelectSingleNode("ancestor::svg:text", this.OwnerDocument.NamespaceManager); } float textFontSize = textElement._getComputedFontSize(); if (sBaselineShift.EndsWith("%")) { shiftBy = SvgNumber.ParseToFloat(sBaselineShift.Substring(0, sBaselineShift.Length - 1)) / 100 * textFontSize; } else if (sBaselineShift == "sub") { shiftBy = -0.6F * textFontSize; } else if (sBaselineShift == "super") { shiftBy = 0.6F * textFontSize; } else if (sBaselineShift == "baseline") { shiftBy = 0; } else { shiftBy = SvgNumber.ParseToFloat(sBaselineShift); } } foreach (XmlNode child in this.ChildNodes) { gp.StartFigure(); if (child.NodeType == XmlNodeType.Text) { ctp.Y -= (float)shiftBy; this.AddGraphicsPath(ref ctp, GetText(child)); ctp.Y += (float)shiftBy; } else if (child is SvgTRefElement) { SvgTRefElement trChild = (SvgTRefElement)child; trChild.GetGraphicsPath(ref ctp); } else if (child is SvgTextContentElement) { SvgTextContentElement tcChild = (SvgTextContentElement)child; tcChild.GetGraphicsPath(ref ctp); } } }