Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   Removing Font Switching (http://forum.bytesforall.com/showthread.php?t=20811)

plowboy Aug 22, 2013 03:27 PM

Removing Font Switching
 
When my website loads.. the <h> tagged text (the title, the post titles, etc.. <h1>, <h2>, <h3> etc) first load in a large alternate font than is default.. and then are changed to the correct font after the page loads..

which for low bandwidth users, sometimes results in no switch at all :/

..is there a way to get these to load in the correct font without the switch?

juggledad Aug 22, 2013 04:31 PM

go to MTO->CSS Settings->Add Google Fonts and blank out the google font and hit save

plowboy Aug 22, 2013 05:31 PM

Quote:

Originally Posted by juggledad (Post 103195)
go to MTO->CSS Settings->Add Google Fonts and blank out the google font and hit save

When I do this.. now it only loads in the pre-switch font..

Is it possible to have it only load in the default font only.. without a switch

The default <h> font is..

Code:

h1, h2, h3, h4, h5, h6 {
        font-family:                        'Yanone Kaffeesatz', sans-serif;
        font-weight:                        normal;
        margin:                                        20px 0 10px 0;
}


EDIT:

I removed the Google Font code like you suggested.. and added the following code into the header, it seems it may have fixed it

Code:

<script type="text/javascript">
  WebFontConfig = {
    google: { families: [ 'Yanone+Kaffeesatz:400,200:latin' ] }
  };
  (function() {
    var wf = document.createElement('script');
    wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
      '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
    wf.type = 'text/javascript';
    wf.async = 'true';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);
  })(); </script>

<script type="text/javascript">

I don't always experience the issue I was having, so I don't know if this issue is 100% resolved yet..

If I see it in the future, I'll come back..

or.. if there are alternative solutions available, I'd be willing to try them in the mean time

plowboy Aug 22, 2013 09:15 PM

Quote:

Originally Posted by plowboy (Post 103196)
When I do this.. now it only loads in the pre-switch font..

Is it possible to have it only load in the default font only.. without a switch

The default <h> font is..

Code:

h1, h2, h3, h4, h5, h6 {
        font-family:                        'Yanone Kaffeesatz', sans-serif;
        font-weight:                        normal;
        margin:                                        20px 0 10px 0;
}


EDIT:

I removed the Google Font code like you suggested.. and added the following code into the header, it seems it may have fixed it

Code:

<script type="text/javascript">
  WebFontConfig = {
    google: { families: [ 'Yanone+Kaffeesatz:400,200:latin' ] }
  };
  (function() {
    var wf = document.createElement('script');
    wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
      '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
    wf.type = 'text/javascript';
    wf.async = 'true';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);
  })(); </script>

<script type="text/javascript">

I don't always experience the issue I was having, so I don't know if this issue is 100% resolved yet..

If I see it in the future, I'll come back..

or.. if there are alternative solutions available, I'd be willing to try them in the mean time

Alright.. I have discovered my fix did not solve this issue..

Any more advice would be appreciated..

I want the font to load on its own, without a switch.. is this possible?

CrouchingBruin Oct 29, 2013 12:47 PM

I may have found a solution.

If you are using the default Yanone Kaffeesatz font family and weights (200 & 400) in your Montezuma site, then copy & paste this line into Appearance > Montezuma Options > Head > Insert Code > Top:
Code:

<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400,200' rel='stylesheet' type='text/css'>
If you are using a different Google font, or additional Google fonts, then go to the Google Fonts site, look for the font(s) that you are using (there's a filter field in the left sidebar), and add the fonts to your "collection." When you're done choosing all of your fonts, click the Use button. Make sure all of the weights that you want are checked off for each font in section 1. Copy & paste the line in section 3 into the Top field as described above.


All times are GMT -6. The time now is 06:37 PM.

Powered by vBulletin® Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.