R
R
Ruslan Dasaev2018-10-15 21:09:35
css
Ruslan Dasaev, 2018-10-15 21:09:35

I can't add my font to the starter template, where is the error?

Hello. I need your help with connecting fonts, here is the source code:
fonts.sass file

@import "_mixins/font-face"

+font-face("roboto-example", "../fonts/RobotoRegular/RobotoRegular")
+font-face("roboto-example", "../fonts/RobotoBold/RobotoBold", bold)
+font-face("museo-sans", "../fonts/MuseoBook/museosanscyrl-300", 300)
+font-face("museo-sans", "../fonts/MuseoMedium/MuseoSansCyrillic-500", 500)
+font-face("museo-sans", "../fonts/MuseoBold/museosanscyrl-700", bold)

next _mixins/font-face
@mixin font-face($font-family, $file-path, $weight: normal, $style: normal, $asset-pipeline: false )
  @font-face
    font-family: $font-family
    font-weight: $weight
    font-style: $style

    @if $asset-pipeline == true 
      src: font-url('#{$file-path}.eot')
      src: font-url('#{$file-path}.eot?#iefix') format('embedded-opentype'), font-url('#{$file-path}.woff') format('woff'), font-url('#{$file-path}.ttf') format('truetype')
    @else
      src: url('#{$file-path}.eot')
      src: url('#{$file-path}.eot?#iefix') format('embedded-opentype'), url('#{$file-path}.woff') format('woff'), url('#{$file-path}.ttf') format('truetype')

Ways: 5bc4d66a49850338048959.png5bc4d675b46c9948095333.png5bc4d67cd0168613483324.png
Here is a screenshot of the command window:
5bc4d6ee74a9c399561866.pngjust refers to the line with the fonts: @import "fonts"
Please help, I hope I posted everything you need.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
akavato, 2018-10-16
@akavato

you need to rename the file to _fonts.sass

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question