Load the correct subset of Open Sans for cyrillic, greek, and vietnamese in addition to latin and latin-ext; following the example of Twenty Twelve. See #26063, props SergeyBiryukov.

Built from https://develop.svn.wordpress.org/trunk@26254


git-svn-id: http://core.svn.wordpress.org/trunk@26160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Matt Thomas 2013-11-18 21:40:10 +00:00
parent fe476702fc
commit 4405cbe475
1 changed files with 15 additions and 1 deletions

View File

@ -559,8 +559,22 @@ function wp_default_styles( &$styles ) {
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css" );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
$subsets = 'latin,latin-ext';
/* translators: To add an additional Open Sans character subset specific to your language,
* translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language.
*/
$subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' );
if ( 'cyrillic' == $subset )
$subsets .= ',cyrillic,cyrillic-ext';
elseif ( 'greek' == $subset )
$subsets .= ',greek,greek-ext';
elseif ( 'vietnamese' == $subset )
$subsets .= ',vietnamese';
// Hotlink Open Sans, for now
$styles->add( 'open-sans', '//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin-ext,latin' );
$styles->add( 'open-sans', "//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets" );
// Dashicons
$styles->add( 'dashicons', '/wp-includes/css/dashicons.css' );