Why calculating text in skiasharp and gdi return not equal result

FamilyName Arial FontSize 12 FontStyle Regular
layout = _gg.MeasureString("A", font, layout, strFormat);
return new SizeF(layout.Width, layout.Height);
Width=16.32552
Height=19.8749962

SKPaint paint=new SKPaint();
paint.Typeface = m_typeface;
float dpi=96;
float punct=72;
paint.TextSize = (int)Math.Ceiling(m_emSize * ( dpi/ punct));
paint.MeasureText("A", ref bounds);
m_actualWidth = Math.Max(m_actualWidth, bounds.Width);
m_actualHeight += m_lineSpacing;
m_actualWidth=19
m_actualHeight=13

Sign In or Register to comment.