Ignore:
Timestamp:
Dec 9, 2017, 2:45:01 PM (3 years ago)
Author:
arnaud.berard@…
Message:
  • on ajoute un parametre subset a la fonction font request
  • define _FONTS_SUBSET permet l'ajout d'un subsetting appliqué globalement au font_requests
File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/webfonts/branches/webfonts2/webfonts2_fonctions.php

    r107941 r107943  
    1111
    1212
    13 function googlefont_request($webfonts){
     13function googlefont_request($webfonts,$subsets=''){
     14        $subset = '&subset=' ;
     15        (strlen($subsets)) ? $subset .= $subsets : $subset = '';
    1416        foreach($webfonts as $font){
    1517                $variants = implode(',',$font['variants']);
     
    1719        }       
    1820        $fonts = implode('|',$fonts);
    19         $request = "https://fonts.googleapis.com/css?family=$fonts";
     21        $request = "https://fonts.googleapis.com/css?family=$fonts".$subset;
    2022        return $request;
    2123}
Note: See TracChangeset for help on using the changeset viewer.