문제 설명
나침반 SCSS 글꼴 URL 구성 문제 (Compass SCSS font‑url configuration issue)
Am writing down a template with use of compass sass here the font‑mixin makes some problem by without setting web font.And my config file is like
http_path = "/"
css_dir = "resources/stylesheets"
sass_dir = "resources/stylesheets"
images_dir = "resources/images"
javascripts_dir = "resources/js"
and then by usage of font mixin generated output is
@font‑face {
font‑family: "cabinregular";
src: url('resources/stylesheets/fonts/cabin‑regular.eot?#iefix') format('embedded‑
opentype'), url('resources/stylesheets/fonts/cabin‑regular.ttf') format('truetype'),
url('resources/stylesheets/fonts/cabin‑regular.woff') format('woff');
}
The path was correct but font won't apply while am running the html.But if i specify the http path like
http_path="/somename/"
it applies. then why it won't works without specifying the http_path..?
참조 솔루션
방법 1:
Bringing src: url("../fonts/cabin‑regular?#iefix");
before the main src make working fine
@font‑face {
font‑family: 'cabinregular';
src: url("../fonts/cabin‑regular?#iefix");
src: url("../fonts/cabin‑regular?#iefix") format("embedded‑opentype"), url("../fonts/cabin‑regular") format("woff"), url("../fonts/cabin‑regular") format("truetype"), url("../fonts/cabin‑regular.svg#cabin‑regular") format("svg");
font‑weight: normal;
font‑style: normal;
}
(by Vivek Vikranth、user3016976)