S
S
Sergey2019-09-22 16:38:03
Vue.js
Sergey, 2019-09-22 16:38:03

How to correctly connect local fonts in vue?

Guys, who connected local fonts using vue cli? I try to connect like this

@font-face {
  font-family: 'Geometria';
  src: url('[email protected]/assets/fonts/geometria/Geometria-Thin.eot');
  src: local('Geometria Thin'), local('Geometria-Thin'),
    url('Geometria-Thin.eot?#iefix') format('embedded-opentype'),
    url('Geometria-Thin.woff') format('woff'),
    url('Geometria-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
}

But the application does not see

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2019-09-22
@Sergamers

in each url path substitute
now you just connected eot
And if you saw on Vue, which means more or less modern browsers, then connect only woff and woff2 - they will cover everything.

@font-face {
  font-family: 'Geometria';
  src: local('Geometria Thin'), local('Geometria-Thin'),
    url('[email protected]/assets/fonts/geometria/Geometria-Thin.woff2') format('woff2'),
    url('[email protected]/assets/fonts/geometria/Geometria-Thin.woff') format('woff');
  font-weight: 100;
  font-style: normal;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question