0

I have to change the font whenever user choose a new one . So I want to load only that font which is selected by user . So how this is possible in angular 2 ?

Anas
  • 971
  • 13
  • 28
HASSAN MEHMOOD
  • 343
  • 2
  • 5
  • 11
  • Looks like a dup of https://stackoverflow.com/questions/8749225/loading-an-external-font-via-inline-css to me – Günter Zöchbauer Mar 19 '18 at 08:04
  • @GünterZöchbauer please read my carefully again its not dup – HASSAN MEHMOOD Mar 20 '18 at 13:19
  • How does reading carefully change anything? Just because you added Angular and `ngStyle`? It's till boils down to a browser and JavaScript ;-) – Günter Zöchbauer Mar 20 '18 at 13:26
  • but @GünterZöchbauer the link you asked is not taking me to the solution – HASSAN MEHMOOD Mar 20 '18 at 13:44
  • It would be more helpful if you'd add information to your question **how** it is not leading you to a solution. `[ngStyle]` is adding inline styles. The linked answer explains how to add `@Font-Face` using inline styles. If that is not what you want, you will probably need to make a feature request on the different browsers to make this easier. – Günter Zöchbauer Mar 20 '18 at 13:45

0 Answers0