Showing Bangla properly in Atom Editor

Last updated on: May 3, 2016

Atom editor could not display Bangla font properly in Markdown file. If I changed the font from settings, it was being applied to all characters, and it was messing up the display. However, there is a CSS based style file that can be used to modify the UI of Atom. I just had to edit it to:

  • Specify a Bengali font for Bengali Characters only
  • Specify a font for All Characters

Only for markdown format, mind you.

Before and After effect of modifying style sheet

Before and After effect of modifying style sheet

I modified the style sheet to specify a font just for Bangla / Bengali characters. This is certainly a workaround, and it does not render completely properly yet - but it is a start.

Here is what I did - pressed ctrl+shift+p to get access to the console thingy (Not quite sure what it is called).

The thing where I accessed the application style

The thing where I accessed the application style

Then, I added the following style:

@font-face {
    font-family: 'bengali';
    src: local('Noto Sans Bengali');
    unicode-range: U+0980-09FF;
}

.markdown-preview.markdown-preview,
atom-text-editor::shadow .source.gfm {
    // use bengali at first for specified,
    //if not specified, use inconsolata
    font-family: bengali, 'Noto Mono';
}

Of course, you will have to install Noto Mono and Noto font in advance to make it work. You can get those from Here. Enjoy!

Written on May 3, 2016