Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to load fonts from resources/fonts directory? #46

Closed
lukaszzdanikowski opened this issue Nov 17, 2017 · 4 comments
Closed

How to load fonts from resources/fonts directory? #46

lukaszzdanikowski opened this issue Nov 17, 2017 · 4 comments
Assignees

Comments

@lukaszzdanikowski
Copy link
Contributor

I would like to add custom font but it seems that font files are not loaded.
I've put my fonts into resources/fonts/abcd/abcd.eot
added this to my style.scss

@font-face {
  font-family: 'abcd';
  src: font-url(abcd/abcd.eot');
  font-weight: normal;
  font-stylle: normal;
}
html { font-family: abcd; }

Font is not loaded on dev and not copied to dist directory.

@tirthbodawala
Copy link
Member

tirthbodawala commented Nov 17, 2017

@lukaszzdanikowski
I think the path is incorrect.

@font-face {
  font-family: 'abcd';
  src: url('../fonts/abcd/abcd.eot')  format('embedded-opentype');
  font-weight: normal;
  font-style: normal;
}
html {font-family: abcd; }

Also the compiled fonts are onlu viewable on building the application, i.e. after running npm run build

@tirthbodawala
Copy link
Member

@lukaszzdanikowski were you able to solve the issue with the answer above?

@lukaszzdanikowski
Copy link
Contributor Author

@tirthbodawala yep, that works perfectly.

@tirthbodawala
Copy link
Member

@lukaszzdanikowski thanks for replying. Closing the issue now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants