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'); работает, но в моем случае не расматриватеся, так как прилоежние будет работать в сети без интернета Quote 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/... ? Quote 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. Заработало Quote Link to comment Share on other sites More sharing options...
MSMK Posted March 18, 2020 Author Share Posted March 18, 2020 хотя нет, не работает Quote 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: хотя нет, не работает Есть ли ошибки в консоли браузера? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.