Was this a UTF-8 WTF?

Today I observed something very odd in Powerpoint. I was pasting in some text from the Simics command-line interface into a text box in Powerpoint to show the output of some commands. Commands whose output relied on box-drawing characters to produce nice tables. But for some reason… it did not work in Powerpoint. Weird.

Screen capture of the Powerpoint text box

At first glance, this looked like what you get when an editor does not understand unicode/UTF-8 correctly. However, the middle column divider does work…

Could this be a case of font not providing the box-drawing characters? But this was Consolas, a font that I have been using for years in both Word and Powerpoint to show Simics output like this. A reliable high-quality font, right?

Turn out, the problem was that I was using Consolas Bold and the box-drawing characters for thick lines. Until now, I had only ever used regular Consolas, or just the thin lines. Combining the two yields the situation above.

Copying the table from the wikipedia article, the problem becomes totally obvious:

Box-drawing characters in Consolas Regular.

Switching the font to bold… reveals the problem:

Box-drawing characters in Consolas Bold

So for some reason, Consolas in Bold only implements a subset of the characters. Bizarre. But at least now I know.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.