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"
],
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