M
M
Mary Solar2017-04-07 11:22:35
Sass
Mary Solar, 2017-04-07 11:22:35

Why doesn't font-face work in sass/gulp?

Hello!
There is a problem with fonts in sass (I use gulp, to be exact - just the beginning).
I describe the actions:
1) In the sass folder, I created a separate _font.sass file for fonts
2) Made @import "font"it in the main main.sass
3) Put the fonts there
1bb19af85cd14f138dc335321042d4c3.png
4) Compilation was successful:
8382794b28264c768218f604bcf3a8b1.png
But there was a problem: the font does not work. If you connect some kind of Tahoma, then everything works. Like vera-crouz and kram support Cyrillic. It should be like this:
07611207bbfd4210bc7e547208b2d444.png
And I have everything in a standard browser font.
Tell me, please, what is the error and where to steer? Thank you all in advance for your help! :)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mary Solar, 2017-04-07
@MaryT

Issue resolved: Syntax error caused compilation to occur but not to proceed correctly

@font-face
    font-family: "kram"
         src : url("../fonts/kraM.ttf")
<---error, must be on the same level
@font-face
    font-family: "kram"
    src : url("../fonts/kraM.ttf")
<--- like this

V
Vlad Feninets, 2017-04-07
@fnnzzz

Different browsers load different font formats.
so you need to generate everything (ttf, otf, eot, woff, woff2, svg).
a similar service will help you with this - https://www.web-font-generator.com/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question