The measured width is the advance width, which includes the
side bearings of the first and last glyphs. However, text as
drawn may go outside this (e.g., due to glyphs that spill
beyond their nominal widths or stroked text with wide lines).
Measurements ignore the current transform. If the text
pointer is null, or the font has not been set yet, or the last
setting of it was unsuccessful, this returns zero.
Measure the width in pixels of a line of text.
The measured width is the advance width, which includes the side bearings of the first and last glyphs. However, text as drawn may go outside this (e.g., due to glyphs that spill beyond their nominal widths or stroked text with wide lines). Measurements ignore the current transform. If the text pointer is null, or the font has not been set yet, or the last setting of it was unsuccessful, this returns zero.