10
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rails 4 でカスタムフォントを使う

Posted at

カスタムフォントの使い方のメモ :pencil:

手順

  1. app/assets/fonts 以下に fontファイルを置く

  2. scss で @font-face を指定

@font-face {
  font-family: 'SkipStd';
  src: font-url('FOT-SkipStd-D.otf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

これで使えるようになります

body {
  font-family: 'SkipStd';
}

反映されなかったら、サーバを立ち上げ直してみてください

参考リンク

plapier さんの説明がわかりやすかったです

https://github.com/thoughtbot/bourbon/issues/239#issuecomment-26167073

10
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?