+ 1
Here's a GitHub repo which uses it: https://github.com/grokify/webfonts
+ 1
Farnaz.A That link you've used won't give you the font. It's just a link to a regular webpage which is for demo purposes. You might've been able to get the font from the link under the Source column in that table where it says SmartFonts.com (https://smartfonts.com/game-of-thrones.font) but I think that's broken. Sorry, I didn't know that when I first shared it.
If you download the GitHub repository, you'll find the actual font files there which shows it works, but unfortunately you won't be able to use the font on Sololearn like that. Unless you serve the font yourself and make a request (XHR) to get that font.
For changing styles on a button click, you just need to change the CSS class on click, a bit like this:
const fontBtn = $('#font-button')
fontBtn.addClass('myClass')
fontBtn.removeClass('myClass')
+ 1
Farnaz.A Just to clarify, you can still use this font very easily, just not on Sololearn (at least not without quite a bit more work).
+ 1
Farnaz.A No worries. I just meant a button to change a CSS class. You can specify what you want in that style of course. So it could be used to toggle font or anything else available in CSS.
Here's an example where I have a button which, when clicked, toggles a style for a test paragraph. I've done this in vanilla JS but you can do the same thing in jQuery using the functions hasClass, addClass, and removeClass.
https://code.sololearn.com/W2A1a27a02A2/?ref=app
Update: this uses Google Fonts btw. See the HTML.
+ 1
Farnaz.A I'm glad. Happy to help :)
0
Farnaz.A , Hey, Remember me? Once you helped me when I was a beginner. Well I have this link from where you can download for free.
https://fontmeme.com/fonts/game-of-thrones-font/
Hope, I helped you and don't forget to be my friend.☺️☺️☺️