Skip to content

Adding Fonts #1317

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

Closed
CLOUGH opened this issue Jul 10, 2016 · 5 comments
Closed

Adding Fonts #1317

CLOUGH opened this issue Jul 10, 2016 · 5 comments

Comments

@CLOUGH
Copy link

CLOUGH commented Jul 10, 2016

Hi im having a very difficult time trying to add font awesome to my application. The css loads fine and everything but I cant get it to load the fonts. What should I do to load the font in angular 2

@zackarychapple
Copy link
Contributor

The paths are relative to your CSS file. If you put a font directory in your app it should get copied to dist. Just need to make sure that you update the CSS file. I'm pretty sure that font-awesome has a variable you can tweak if you're using the SCSS version.

@serhiisol
Copy link
Contributor

serhiisol commented Jul 12, 2016

Question more like about how to copy correctly fonts from node_modules into src folder

And the answer is:
Use angular-cli.js:

vendorNpmFiles: [
      ...

      'font-awesome/fonts/*.*'
      ...
],

and then, somewhere in your sass change font-awesome font path:

$fa-font-path: "../vendor/font-awesome/fonts"

@CLOUGH
Copy link
Author

CLOUGH commented Jul 12, 2016

I didn't had any issues copying over the font from the library with the same folder structure.
The big question now is do I really need to modify the font awesome font location to explicitly state its in the vendor folder. I can imagine this would get very difficult to manage with libraries with multiple relative fonts defined in thier CSS.
That's my real issue I don't want to have to do that and plus I can't really change the font awesome CSS if I'm pulling it in from npm only of I overload it and that's still don't feel right.

@filipesilva
Copy link
Contributor

I'm closing this in favor of #1463.

This issue here was older but in #1455 we drastically changed the build system, and #1463 describes the current situation better.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants