I wanted to draw a Text inside a Circle provided that text should be matched properly at the center of the circle. Actually I am not getting a general method/way to make text at the center. Also it should not depend in whether the Text is in uppercase or lower case.
My attempt :-
textPaint.TextAlign = Paint.Align.Center; // basic need.
After that I tried to get Ascent and Descent of the Font and get their half and moved the text below by this value. But it is not centered :(
var fontAscent = -textPaint.Ascent(); // default value is negative for ascent
var fontDescent = textPaint.Descent();
note :- I am getting the circle at the center so its center point is correct.
Any Idea how can i do it.