Help us understand the problem. What is going on with this article?

atomのmarkdown-previewで日本語が豆腐になる(Ubuntu)

More than 3 years have passed since last update.

Ubuntuのatomでmarkdownが豆腐(□)になってしまう件の対処。

環境

  • Ubuntu 15.04
  • atom 1.0.0

対処前の状態

markdown-previewを表示すると、日本語が全て□になってしまう。

markdown_before.png

SettingsのFont Familyに日本語フォントを設定してもダメ。

対処

メニューのEdit -> Preferences -> Open Config Folder を選択。
styles.lessを開き、font-familyの設定を行う。
以下の"Source Han Code JP"は、自分の環境にインストールしている日本語フォントなので、自分の環境にインストールしている日本語フォント名を設定する。

styles.less
* {
    font-family: Source Han Code JP;
}

.markdown-preview {
    h1,h2,h3,h4,h5,h6 {
      font-family: Source Han Code JP;
    }
}

対処後

日本語も全て表示されるようになった。

markdown_after.png

参考

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away