If I chose a not a default fontface in a button .
a error wold thow up while running.
so I can only use the default fontface .
and I can't not choose a fontface while use Canvas, there is no a option there to set.
as we know there are many font's , Monospaced font & Proportional fonts
every charactor have same width in Monospaced fonts , but not in Proportional fonts, 'i' and 'a' has different width for eg.
Obviously, only proportional fonts can be used in the Canvas,
So my problem is ,how to get the width of a string , while I use the DrawText method in the cavas,
for aligning the width of each line.
Getting the width of a single character isn't as helpful as getting the width of a string, because different combinations of consecutive characters fit together differently in a process called kerning, which pushes characters together if they can fit.