Google fonts question

Post

Posted
Rating:
#1632 (In Topic #331)
Avatar
Standard member
lg11 is in the usergroup ‘Well-settled’

where do you add the code for using google fonts?

I notice in fonts file it says about uncommenting the code to enable google fonts, i assumed adding the code from google fonts (another font), would allow me to use it.

It didnt work, the example in the file has http:// in the address and the one from google fonts site, has https:// in the address, apart from that the paths were pretty much identical.

On the google fonts site, it say to embed the font you add the code, that is supplied by google, to the HTML header file.

So do i add this code to the fonts file or to the global template file, under the header section?
Online now: No Back to the top

Post

Posted
Rating:
#1633
Avatar
Standard member
lg11 is in the usergroup ‘Well-settled’
I might have worked this out! The uncomment part of the file, i was looking for comments as i know them, which is to say anything like


 

But i think in the code used here [tempcode]?? comments are denoted by



so it appears

What i am not sure of though is the / inside the code. Google says to past

<span href="https://fonts.googleapis.com/css?family=Cinzel+Decorative&amp;amp;quot; rel="stylesheet">

But if my theory of comments above is correct, that dosnt explain why the font when uncommented is

<link href="//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600" rel="stylesheet" />

why is there a space and forward slash? unless the forward slash is part of the comment? but that dosnt make much sense to me. Having said that i am used to C for micros not PHP/tempcode,HTML etc etc

EDIT having pasted what i wrote, i see that the google version i pasted came out as a link, so i am thinking the forward slash is not needed.
 
Online now: No Back to the top

Post

Posted
Rating:
#1634
Avatar
Standard member
lg11 is in the usergroup ‘Well-settled’
Ok i got it i think, But now i need to know how to add another syle. something Like h6, so i can use the font just where i want it and not all over the place…………

So now i am tracking down where the H tags etc are defined. This is what takes time in designing, its the looking and learning how something works. But once its learnt it should be alot faster :D
Online now: No Back to the top

Post

Posted
Rating:
#1635
Avatar
Standard member
lg11 is in the usergroup ‘Well-settled’
Ok i am nearly sure i have it, just got to try it live! I will report in the forgotten thread if i have or not :D.
Online now: No Back to the top

Post

Posted
Rating:
#1642
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Tempcode comments do have their own syntax. Google is liable to change the sample code they provide over time. "//" at the start of the URL means "same protocol as the page is currently using".


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#1646
Avatar
Standard member
lg11 is in the usergroup ‘Well-settled’
Thanks again Chris, i got the font working in the end. But i might upload it….

It must be torture watching what i put your software through :D. All those nice gradients swapped for 1970's wallpaper colours lol.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

John Connor, Vaiva, babu, deepu_ms, MVLipwig, mytracker, Manu

Forum statistics:
  • 1,296 topics, 5,829 posts, 7,064 members
  • Our newest member is flour2door
Birthdays:
Back to Top