Advertisement
LinkRio

Delaware Theme Custon Css - Show Fonts Chrome Fix

Jul 15th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.44 KB | None | 0 0
  1.     #-----------------------------------------------------------------
  2.     # Load Cutom Font Face
  3.     #-----------------------------------------------------------------
  4.     if(isset($theme_options['custom_font']) && is_array($theme_options['custom_font'])) :
  5.    
  6.         foreach ($theme_options['custom_font'] as $key => $value) {
  7.                    
  8.             $finalcss .= "\n"."@font-face {\n";
  9.                
  10.                 if(!empty($value['title']))
  11.                 $finalcss .= "font-family: '".$value['title']."';"."\n";
  12.                
  13.                 if(!empty($value['embedded-opentype'])) {
  14.                     $finalcss .= "\t" ."src: url('".$value['embedded-opentype']."');"."\n";    
  15.                     $finalcss .= "\t" ."src: url('".$value['embedded-opentype']."?#iefix') format('embedded-opentype'),"."\n";
  16.                 }
  17.                
  18.                 if(!empty($value['svg']))
  19.                 $finalcss .= "\t" . "url('".$value['svg']."') format('svg');"."\n";    
  20.                
  21.                 $finalcss .="font-weight: normal;\nfont-style: normal;"."\n";      
  22.                
  23.             $finalcss .= "}"."\n\n";
  24.  
  25.             if(!empty($value['truetype']) && (!empty($value['title']))){
  26.                 $finalcss .= "/*if mozilla*/"."\n";
  27.                 $finalcss .= "@-moz-document url-prefix() {"."\n";
  28.                 $finalcss .= "\t"."@font-face {"."\n";
  29.                 $finalcss .= "\t\t"."font-family: '".$value['title']."';"."\n";
  30.                 $finalcss .= "\t\t"."src: url('".$value['truetype']."') format('truetype');"."\n";
  31.                 $finalcss .= "\t"."font-weight: normal;"."\n"."\t"."font-style: normal;"."\n";     
  32.                 $finalcss .= "\t"."}"."\n";
  33.                 $finalcss .= "}"."\n\n";
  34.             }
  35.         }
  36.     endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement