I am trying to measure the size of a string given a certain font using the TextRenderer class. Despite the fact that i tried measuring it with 3 different approaches (Graphics.MeasureCharacterRanges, Graphics.MeasureString, TextRenderer.MeasureText) and they all give me different results without being accurate, i've stumbled across something else.
Measuring the same string START with the same font using a fontsize of 7 and 8, the fontsize 7 measurement turns out to be wider than the the fontsize 8 measurement.
Here's the code i use:
Font f1 = new Font("Arial", 7, FontStyle.Regular);
Font f2 = new Font("Arial", 8, FontStyle.Regular);
Size s1 = TextRenderer.MeasureText("START", f1);
Size s2 = TextRenderer.MeasureText("START", f2);
The result is s1 having a width of 41 and a height of 13 while s2 having a width of 40 and a height of 14.
Why would a smaller font result in a larger width?

To address specifically why it would be possible for a larger font to produce a smaller width, I put together this sample console app. It's worth noting that I adjust the 7 & 8 font sizes to 7.5 & 8.25, respectively, as this is what size
TextRendererevaluates them as internally.For each font size, it outputs the width of each character, including kerning. At 96 DPI, for me, this results in:
Though I've obviously not captured the exact formula for measurements made by
TextRenderer, it does illustrate the same width-discrepancy. At font size 7, all characters are 7 in width. However, at font size 8, the character widths begin to vary, some larger, some smaller, ultimately adding up to a smaller width.