Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Why calculating text in skiasharp and gdi return not equal result

$
0
0

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


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>