2

Here's how some of the double-struck unicode letters display in my copy of Emacs for Windows:

enter image description here

Here's how they display in Notepad:

enter image description here

Version of Emacs:

enter image description here

What's a good way to get Emacs to display all of these correctly?

  • It's a font issue. You need one with good Unicode support. Try something like DejaVu Sans Mono. – Dan Jun 13 '17 at 3:44
  • Hi @Dan. The notepad instance in the screenshot is using 'Courier New'. If I switch Emacs to use that font, the display issue still exists. – dharmatech Jun 13 '17 at 4:18
  • @Dan, just to be sure, I switched to DejaVu Sans Mono and the characters are not displaying properly. – dharmatech Jun 13 '17 at 4:25
3

Font names are misleading here, because when an application finds that the font it's using doesn't have a glyph for the character it's rendering, it can choose to find a different font that does. In this case, Courier New doesn't have any double-struck characters in it, so both Emacs and Notepad choose a different font that does. You can see this because although the glyphs that Notepad has rendered look nicer than the ones Emacs has rendered, Notepad has chosen a proportionally-spaced font, while Emacs has chosen a monospaced font. It couldn't find a monospaced font that had every one of those characters though, so for some of them it fell back to drawing a box with the character number in it.

To change how Emacs chooses a fallback font, you'll want to read up on Fontsets in the chapter 22.13 of the manual. Chapter 22.15 shows how to modify the default fontset to change what fonts it chooses for different text encodings, scripts, character ranges, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.