This project is read-only.

load new google font

Topics: Customizing Orchard, General
Jan 30, 2012 at 2:02 PM

thanks for your time
I like to change the font of the Site Title. Therefore, I changed 'Layout.cshtml (to include another font) and Site.css' accordingly. My research in Google shows 'Lekton' as a valid google Font!.
Using below include for 'Lekton' does not give any feedback nor error msgs!

PS: I can influence the font via the Site.css or the 'browser Dev Tools'; but first I need to load the new font in Layout.cshtml!

? are there restrictions on which google fonts to use ?
? what am I missing here ?

thanks ed

/* Global includes for the theme
    SetMeta("X-UA-Compatible", "IE=edge,chrome=1");

/*font-family: 'Lobster', Tahoma, Arial, Helvetica, sans-serif;*/
        font-family: 'Lekton', Tahoma, Arial, Helvetica, sans-serif;

Jan 30, 2012 at 8:42 PM

This looks like it should work. You might want to check in your browser's dev tools (in the network tab) if the font request actually goes through without error.

Jan 31, 2012 at 11:50 AM

well this is strange:

first I tested as you suggested with "" AND the original one:'Lobster'. Both bring back a css.css file which look essentially the same! So I assume this is ok!

During my testing - I started my app several times - only once (1) I quickly have seen the new font in my web site title!? However when starting again the font went back to the 2nd font in the 'font-family' which seems logical!? Later trials all failed; also restarting my PC didn't work (cache!). I'm using a 8MB ASDL line!

So I start to think whether there is a timing problem!

? is orchard fetching the font each time I start it?
? could I work with a downloaded font ? where would I store it?

thanks for your time, ed


Jan 31, 2012 at 1:24 PM

Sounds like a browser cache; refresh the page with Ctrl-F5 or even delete the whole cache from the browser menu.

Jan 31, 2012 at 1:26 PM

Oh also, do you have Warmup or Cache modules installed? It might be you're getting cached copies of an old version of the page.

Jan 31, 2012 at 4:29 PM

Thank you both, good advise as usual!, ed