Jump to content

Подключение шрифтов


MSMK

Recommended Posts

Подскажите как подключить шрифты в css, которые находятся на сервере

в папку files расположил файлы шрифта

в customCSS прописал в начале

@font-face{
font-family: 'Montserrat';   
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/Montserrat-Regular.ttf') format('truetype');    
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

 

не работает

 

P>S Вариант как @import url('https://fonts.googleapis.com/css?family=Montserrat&display=swap');  работает, но в моем случае не расматриватеся, так как прилоежние будет работать в сети без интернета

Link to comment
Share on other sites

8 minutes ago, Sherzod said:

Здравствуйте,

Возможно Вы забыли добавить /files/... ?

@font-face {
font-family: "Montserrat";
src: url("../fonts/Montserrat-Regular.ttf") format("truetype");
font-style: normal;
font-weight: normal;
}

подправил и папку fonts разместил в каталоге с .exe. Заработало

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...