내 나침반 디렉토리가이 같은 모양 글꼴 파일을 찾을 수 없습니다 : 글꼴 얼굴나침반 @ 글꼴 얼굴이
root_of_directory
sass
screen.scss
stylesheets
fonts
goudysto.ttf
screen.css
다음 믹스 인은 다음과 같습니다
@include font-face("goudysto", font-files("goudysto.ttf", "truetype"));
출력
GET file:///fonts/goudysto.ttf net::ERR_FILE_NOT_FOUND
이 출력 된 CSS를
입니다 : 콘솔이 말한다@font-face {
font-family: "goudysto";
src: url('/fonts/goudysto.ttf') format('truetype');
}
왜 이런 일이 일어 났는지 말해 줄 수 있습니까?
* UPDATE - config.rb *
require 'compass/import-once/activate'
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
fonts_dir = "stylesheets/fonts"
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
URL에 '/'가 붙어 있기 때문에 글꼴 파일이 루트에서 찾고있는 것처럼 보이지 않습니다 (프로젝트가 프로젝트 폴더에있는 경우, 그 다음에 루트가 프로젝트보다 깊음). 시작 '/'을 제거해 보셨습니까? – somethinghere
시작/자동 추가 중입니다. 나는 그것을 제거하는 방법을 모른다. – chap
실제 CSS 파일에서 먼저 제거하여 문제가 해결되는지 확인한 다음 오류의 방향을 알 수 있습니다. – somethinghere