@ font-face w Rails 4.0 z nie znaleziono adresu URL Sass dla niestandardowych czcionek
W moim projekcie Rails próbuję użyć niestandardowych czcionek. Istnieje wiele odpowiedzi związanych z tym pytaniem, podobnie jak ta odpowiedź, która nie pomogła, edytowałemdevelopment.rb
:
# Add the fonts path
config.assets.paths << Rails.root.join('app', 'assets', 'fonts')
# Precompile additional assets
config.assets.precompile += %w( .svg .eot .woff .ttf )
nadal to pokazujeNo route matches [GET] "/assets/chalkduster-webfont.woff"
Ustawiłem mnieurl
lubić:
@font-face {
font-family: 'chalkdusterregular';
src: url('chalkduster-webfont.eot');
src:url('chalkduster-webfont.svg#chalkdusterregular') format('svg'),
url('chalkduster-webfont.eot?#iefix') format('embedded-opentype'),
url('chalkduster-webfont.woff') format('woff'),
url('chalkduster-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
próbowałemfont_path('')
w obrębie źródła, a takżefont-url()
nigdy nie działa. :(