From ebb4753f123b46a89505823d4f469087a03b462d Mon Sep 17 00:00:00 2001 From: Matt Thomas Date: Mon, 18 Nov 2013 21:39:22 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@26254 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/script-loader.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index b1f068031f..311bdda495 100644 --- a/src/wp-includes/script-loader.php +++ b/src/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' );