0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

RailsでCustom Fontを使う(Webpacker)

Last updated at Posted at 2024-12-02

フォントをダウンロードして、app/javascript/src配下に置く

app/javascript/src/style.scssにフォントのパスを記入と使用

@font-face {
  font-family: "maru-gosic";
  src: url('./Corporate-Logo-Rounded.ttf') format('truetype');
}

html {
  font-family: "maru-gosic";
}

これで、OK!!

参考: https://anthonybroadcrawford.com/2020/02/14/custom-fonts-rails-six.html

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?