css - @font-face doesn't work in play-framework -
in css, have:
@font-face { font-family: 'myfont'; src: url("fonts/bluepss.ttf"); font-weight: normal; font-style: normal; } button { font-family: myfont; font-size: 40px; color: #ffffff; width: 400px; height: 100px; background-color: #bdaec6;
}
the bluepss.ttf file stored in public/fonts/ folder. ideas why font's not showing up?
thanks in advance.
thanks @cyn, found answer. realized in route file had
get /public/*file controllers.assets.at(path="/public", file)
so instead of assets, put public, , worked: /assets/fonts/bluepss.ttf
Comments
Post a Comment