Font change problem

Business template for Joomla 3 and 2.5 ideal to create blog or personal website.
GK User
Tue Jul 16, 2013 12:21 pm
Us the real design template we have changed the font to Comic instead of the script font
this works ok on standard PC, Mac and laptop but does not work on mobile or iPad, why
is this and how can I make it work across both, on mobile and iPad it reverts back to script
font....need help and advice.

Many thanks

Mike
User avatar
Fresh Boarder

GK User
Tue Jul 16, 2013 4:08 pm
Could You post an url to your site?
User avatar
Moderator

GK User
Wed Jul 17, 2013 6:30 pm
Cyberek wrote:Could You post an url to your site?



www.demo2.mggraphicshalstead.co.uk

Font is ok on normal doesn't work on mobile / iPads

Thanks

Mike
User avatar
Fresh Boarder

GK User
Wed Jul 17, 2013 6:40 pm
For iPad's and iPhones this template generates different layout, and with this "mobile" layout font change is not supported. Font change only works with desktop version.
User avatar
Moderator

GK User
Wed Jul 17, 2013 6:42 pm
Cyberek wrote:For iPad's and iPhones this template generates different layout, and with this "mobile" layout font change is not supported. Font change only works with desktop version.


So is there no way round this then, to get the iPad and Mobile version to work with new typeface?

Mike
User avatar
Fresh Boarder

GK User
Wed Jul 17, 2013 8:12 pm
You could try to use this code:
Code: Select all
// include fonts

   $font_iter = 1;

   

   while($this->getParam('font_name_group'.$font_iter, 'gkFontNull') !== 'gkFontNull') {
     $font_data = explode(';', $this->getParam('font_name_group'.$font_iter, ''));
     if(isset($font_data) && count($font_data) >= 2) {
          $font_type = $font_data[0];
          $font_name = $font_data[1];
          if($this->getParam('font_rules_group'.$font_iter, '') != ''){
               if($font_type == 'standard') {
                    $this->addCSSRule($this->getParam('font_rules_group'.$font_iter, '') . ' { font-family: ' . $font_name . '; }'."\n");
               } elseif($font_type == 'google') {
                    $font_link = preg_replace('/https?:/m', '', $font_data[2]);
                    $font_family = $font_data[3];
                    $this->addCSS($font_link);
                    $this->addCSSRule($this->getParam('font_rules_group'.$font_iter, '') . ' { font-family: \''.$font_family.'\', Arial, sans-serif; }'."\n");
               } elseif($font_type == 'squirrel') {
                    $this->addCSS($this->URLtemplate() . '/fonts/' . $font_name . '/stylesheet.css');
                    $this->addCSSRule($this->getParam('font_rules_group'.$font_iter, '') . ' { font-family: ' . $font_name . ', Arial, sans-serif; }'."\n");
               } elseif($font_type == 'adobe') {
                    $this->API->addJS('//use.edgefonts.net/'.$font_name.'.js');
                $font_name = explode(":", $font_name);
                $font_name = $font_name[0];
                $this->API->addCSSRule($this->API->get('font_rules_group'.$font_iter, '') . ' { font-family: ' . $font_name . ', Arial, sans-serif; }'."\n");
               }
          }
     }
     $font_iter++;
     }


taken from templates/gk_the_real_design/layouts/blocks/head.php

and implement it in:
templates/gk_the_real_design/layouts/blocks/mobile/head.android.php,
templates/gk_the_real_design/layouts/blocks/mobile/head.handheld.php,
templates/gk_the_real_design/layouts/blocks/mobile/head.iphone.php

But its just the draft of things to do, as mobile version uses different styles also.

Sadly its a customization beyond our support.
User avatar
Moderator


cron