Hi!
Cannot replicate.
My test code:
Code:
// Create a font
XFont font = new XFont("Times New Roman", 20, XFontStyle.BoldItalic);
// Draw the text
gfx.DrawString("Hello, World!", font, XBrushes.Black,
new XRect(0, 0, page.Width, page.Height),
XStringFormats.Center);
ue
{
var res = gfx.MeasureString(" ", font);
res = gfx.MeasureString(" ", font);
res = gfx.MeasureString(" ", font);
res = gfx.MeasureString(" ", font);
res = gfx.MeasureString(" ", font);
res = gfx.MeasureString(" ", font);
res = gfx.MeasureString(" ", font);
res = gfx.MeasureString(" ", font);
}
Width was always 0, no exception was thrown.
We need a sample (maybe an SSCCE) to replicate the issue.
See also:
viewtopic.php?p=2094#p2094