Base solution for your next web application
Open Closed

How to add google font and other global style (angular +core)? #6465


User avatar
0
mirzanas created

Hi, I want to add google font to the global styling, from the project perspective looks like import (@import url('https://fonts.googleapis.com/css?family=Felipa')) could be added to the 'angular/src/styles.css', and it's work but only localy, after prod build doesn't, so how proparly should be added google fonts to the asp.net zero and other global style changing, and why after prod build 'styles.css' didn't import the font?

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    I guess it is related to this issue, but the issue is still not solved.

    https://github.com/angular/angular-cli/issues/10855

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    mirzanas created

    so how currently I could add new font?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    You can copy font files to assets like this we do here https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/angular.json#L19

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    mirzanas created

    thanks for help!

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)