How to compute the correct width of a digit in pixels?

Small adjustments are required to make this work as intended: TextRenderingHint.ClearTypeGridFit gives a better result when rendering the Text. It’s more precise and works well with the grid-fitting nature of Graphics.DrawString. See the notes you can find in the answer linked below for more informations on this matter. StringFormat alignment in both horizontal and vertical … Read more