Asp.net Core Change Font

Dear Teams,

Actually, we download and follow your docs instructions about installing the Asp.net core theme, and we try to change the font from appsettings.json but it's not working!!
any advice? maybe we should gulp it (like standard HTML theme version?)

this what we did in appsettings.json
"Assets": {
"Favicon": "media/logos/favicon.ico",
"Fonts": [
"https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap"
],

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)

Hi,

You just need to update the "Fonts" array and restart the server, all fonts from the array will be loaded automatically. We are including these fonts in file Starterkit/Views/Layout/Master.cshtml.

Regards,
Lauris Stepanovs,
Keenthemes Support Team

Thank you for your reply,

we actually did what you mentioned, but unfortunately the new font "google font" it's not displaying,
I also restart my Laptop as you mention.

please have a look at my array setting:

"Assets": {
"Favicon": "media/logos/favicon.ico",
"Fonts": [
"https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap"
],
"Css": [
"plugins/global/plugins.bundle.css",
"css/style.bundle.css",
"css/cz-style.css"
],

By updating the array the Fonts from the array will be included on your pages, if you want to use them you need to update SASS variable.

In file Starterkit/_keenthemes/src/metronic/demo1/sass/components/_variables.scss update $font-family-sans-serif variable and rebuild assets with Gulp or Webpack.

Regards,
Lauris Stepanovs,
Keenthemes Support Team

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(