SteGriff

Blog

Next & Previous

Enable ligatures and emoji in Notepad++

By default, emoji don’t work very well in Notepad++ and font ligatures don’t work at all. I have pieced together this guide from other people who have worked on the problems, notably this GitHub issue about ligatures in Notepad++ and this newsgroup post about character encoding detection. Shoulders of giants etc.

Enable DirectWrite

Scintilla is the text editor control within Npp. Enabling DirectWrite in Scintilla lets Windows do some Windows-y things to the text drawn to screen, like rendering the advanced typography features of OpenType (read more on the docs for DirectWrite).

To do this,

Add the following code:

editor1.Technology = SC_TECHNOLOGY_DIRECTWRITE
editor2.Technology = SC_TECHNOLOGY_DIRECTWRITE

To actually appreciate this effect, you should install Fira Code (use either normal font or retina as those are the only ones that seem to work - ‘light’ etc do not).

You need to Restart Notepad++ to see the benefits. To test, try typing => which should turn into a cool arrow operator.

Emoji

Firstly, I have noticed that using the Touch Keyboard in Windows 10 to add Emoji into Notepad++ does not work right, it always yields a Rat and some other character (it varies). You need to copy and paste from a different source for Emoji to work right in Npp.

Make sure that your Encoding is UTF-8.

Enabling DirectWrite will immediately improve the display of emoji. One remaining hassle is that the encoding will keep reverting to ANSI when you open a file. One thing that can help with this (although it’s not working great for me) is to turn off ‘Autodetect character encoding’:

Apart from that, remember to check your encoding if your emoji look garbled! Emoji are Unicode characters, so you must use UTF-8!

Good luck, have fun! :)