Commit df558214 authored by mul82's avatar mul82 Committed by mrbean-bremen
Browse files

Text positioning when printing - vertical graphics context resolution (#356)

- vertical graphics context resolution has been used incosistently which leads to wrongly positioned texts when printing
parent d35189ec
......@@ -37,7 +37,7 @@ namespace Svg
var ff = _font.FontFamily;
float ascent = ff.GetCellAscent(_font.Style);
float baselineOffset = _font.SizeInPoints / ff.GetEmHeight(_font.Style) * ascent;
return renderer.DpiY / 72f * baselineOffset;
return SvgDocument.PointsPerInch / 72f * baselineOffset;
}
public IList<RectangleF> MeasureCharacters(ISvgRenderer renderer, string text)
......
......@@ -39,7 +39,7 @@ namespace Svg
{
float ascent = _font.Descendants().OfType<SvgFontFace>().First().Ascent;
float baselineOffset = this.SizeInPoints * (_emScale / _size) * ascent;
return renderer.DpiY / 72f * baselineOffset;
return SvgDocument.PointsPerInch / 72f * baselineOffset;
}
public IList<System.Drawing.RectangleF> MeasureCharacters(ISvgRenderer renderer, string text)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment