DrawString and WhiteSpace

G

Guest

I apologize if this double posts.

I'm currently building a document viewer that uses DrawString(...) to render
text. I've gotten it working quite well, including getting MeasureString and
StringFormat.GenericTypographic. However, I run into a problem when I have
to print a string consisting purely of whitespace.

This problem only occurs when it's a collection of spaces, like " ", and
the Font says to underline it. If there's non-whitespace text on both sides
of the spaces, the spaces will be underlined. Otherwise, no underline. Is
there a way I can get GDI+ to underline spaces like in Word?

Thanks in advance,

kate
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top