2017-01-31 4 views
0

내 웹 사이트의 글꼴을 변경해야합니다. Webfont 파일 (.eot, woff, ttf, woff2, svg 파일)이 웹 사이트에 포함되어 있어야합니다. 하지만 같은 글꼴에 대해 3 세트의 글꼴 파일이 있습니다. 하나는 영어, 스페인어 및 포르투갈어로 각각 설정됩니다. @ font-face를 사용하여 영어로 했어요. 하지만 다른 두 언어에 대해서는 어떻게해야합니까? 제발 조언. 감사합니다다른 언어로 webfont 포함하는 방법

+0

가능한 post.Thanks 주시기 바랍니다 다양한 글꼴 - 무게와 스타일에 대한 유사하게 계속 중복 [다른 언어에 다른 글꼴을 사용하는 텍스트 스타일 지정] (영문) (http://stackoverflow.com/questions/8838075/stylize-text-to-use-different-fonts-for-different-languages) – LGSon

답변

0

제가 알기에이 바로 가기가 없습니다. 각 파일 세트에 대해 글꼴 -면 규칙을 추가해야합니다. 여러분의 노력을 줄여 줄 수있는 것은 SASS 변수를 아래와 같이 사용하는 것입니다. ('webfont'는 사용하기로 결정한 글꼴을 나타냅니다.)

$font-prefix: 'webfont'; 

$font-reg: "#{$font-prefix}_reg-webfont"; 
$font-bold: "#{$font-prefix}_bld-webfont"; 
$font-black: "#{$font-prefix}_blk-webfont"; 
$font-light: "#{$font-prefix}_light-webfont"; 
$font-medium: "#{$font-prefix}_med-webfont"; 
$font-thin: "#{$font-prefix}_thin-webfont"; 

$font-reg-it: "#{$font-prefix}_reg_it-webfont"; 
$font-bold-it: "#{$font-prefix}_bld_it-webfont"; 
$font-black-it: "#{$font-prefix}_blk_it-webfont"; 
$font-light-it: "#{$font-prefix}_light_it-webfont"; 
$font-medium-it: "#{$font-prefix}_med_it-webfont"; 
$font-thin-it: "#{$font-prefix}_thin_it-webfont"; 


//Normal style fonts 

@font-face { 
    font-family: "Brandon"; 
    src: url("#{$font-reg}.eot"); 
    src: 
    url("#{$font-reg}.eot?#iefix") format("embedded-opentype"), 
    url("#{$font-reg}.woff2") format("woff2"), 
    url("#{$font-reg}.woff") format("woff"), 
    url("#{$font-reg}.ttf") format("truetype"), 
    url("#{$font-reg}.svg#svgFontName") format("svg"); 
    font-weight: 400; 
    font-style: normal; 
} 

..... ====== 스페인어 다양한 글꼴 - 무게와 스타일에 대한 유사

================= 계속 =========

$font-prefix: 'webfont'; 

$font-reg: "#{$font-prefix}_reg_es-webfont"; 
$font-bold: "#{$font-prefix}_bld_es-webfont"; 
$font-black: "#{$font-prefix}_blk_es-webfont"; 
$font-light: "#{$font-prefix}_light_es-webfont"; 
$font-medium: "#{$font-prefix}_med_es-webfont"; 
$font-thin: "#{$font-prefix}_thin_es-webfont"; 

$font-reg-it: "#{$font-prefix}_reg_it_es-webfont"; 
$font-bold-it: "#{$font-prefix}_bld_it_es-webfont"; 
$font-black-it: "#{$font-prefix}_blk_it_es-webfont"; 
$font-light-it: "#{$font-prefix}_light_it_es-webfont"; 
$font-medium-it: "#{$font-prefix}_med_it_es-webfont"; 
$font-thin-it: "#{$font-prefix}_thin_it_es-webfont"; 


//Normal style fonts 

@font-face { 
    font-family: "Brandon_es"; 
    src: url("#{$font-reg}.eot"); 
    src: 
    url("#{$font-reg}.eot?#iefix") format("embedded-opentype"), 
    url("#{$font-reg}.woff2") format("woff2"), 
    url("#{$font-reg}.woff") format("woff"), 
    url("#{$font-reg}.ttf") format("truetype"), 
    url("#{$font-reg}.svg#svgFontName") format("svg"); 
    font-weight: 400; 
    font-style: normal; 
} 

는 .....

다른 쉬운 방법,

관련 문제