Just to confirm that I am importing google fonts correctly

Just to confirm that I am importing google fonts correctly

Mari Cruz García -
回帖数:1

Hello Everybody,

I am customising Julian's theme 'Essential' for a new Moodle site 2.5.

Since our corporate web branding involved the use of different google fonts than the one he uses,

In the file /style/custom.css, which seem to be the one containing the core elements, I have added the following lines:

 
 @import url(http://fonts.googleapis.com/css?family=Lora);
@import url(http://fonts.googleapis.com/css?family=Open+Sans);
@import url(http://fonts.googleapis.com/css?family=Anton);

I have defined h2 as

h2 {
color:     #01587C;
font-family: Anton; !important

font-size: 28.6px;
font-weight: 400;
font-style: normal;
text-transform: uppercase;
text-decoration: none;
line-height: 28.6px;
vertical-align: baseline ;

}

 

However when I look at the style of this element in Firebug:

<h2 id="yui_3_9_1_3_1387453651874_206">PGCERT/PG DIP/MSC IN QUALITY DIABETES CARE</h2>

The font family is "Oswald",​sans-serif. I have checked that h2 is not defined or modify in any other css file.

Is it because of the id="yui_3_9_1_3_1387453651874_206" or is it because I am not importing correctly the google fonts?

Thank you very much for your advice.

 

回复Mari Cruz García

Re: Just to confirm that I am importing google fonts correctly

Mari Cruz García -

Just to let everybody know that I have found a way of fixing it:

In essential/ layout/includes/ is the file font.php

in which I have replaced, line 2:

<link href="http://fonts.googleapis.com/css?family=Anton" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=PT+Sans" rel="stylesheet" type="text/css">