MSMK Posted March 18, 2020 Share Posted March 18, 2020 Подскажите как подключить шрифты в 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 More sharing options...
Sherzod Posted March 18, 2020 Share Posted March 18, 2020 19 minutes ago, =GGG= said: /Montserrat-Regular.ttf Здравствуйте, Возможно Вы забыли добавить /files/... ? Link to comment Share on other sites More sharing options...
MSMK Posted March 18, 2020 Author Share Posted March 18, 2020 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 More sharing options...
MSMK Posted March 18, 2020 Author Share Posted March 18, 2020 хотя нет, не работает Link to comment Share on other sites More sharing options...
Sherzod Posted March 18, 2020 Share Posted March 18, 2020 3 hours ago, =GGG= said: хотя нет, не работает Есть ли ошибки в консоли браузера? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now