From 4405cbe47517c759084253585df9bc565c8e5190 Mon Sep 17 00:00:00 2001 From: Matt Thomas Date: Mon, 18 Nov 2013 21:40:10 +0000 Subject: [PATCH] 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 --- wp-includes/script-loader.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index b1f068031f..311bdda495 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -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' );