Skip to content

Commit

Permalink
Rosetta styles: Use Noto Kufi Arabic for Central Kurdish site
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Aug 5, 2024
1 parent 16a3699 commit 2005646
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions source/wp-content/themes/wporg-main-2022/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,19 @@ function enqueue_assets() {

// Preload the heading font(s).
if ( is_callable( 'global_fonts_preload' ) ) {
/* translators: Subsets can be any of cyrillic, cyrillic-ext, greek, greek-ext, vietnamese, latin, latin-ext. */
$subsets = _x( 'latin', 'Heading font subsets, comma separated', 'wporg' );
if ( ! in_array( $subsets, [ 'cyrillic', 'cyrillic-ext', 'greek', 'greek-ext', 'vietnamese', 'latin', 'latin-ext' ] ) ) {
$subsets = 'latin';
}

if ( 'ja' === get_locale() ) {
global_fonts_preload( 'Noto Serif JP', 'cjk' );
} else if ( 'ckb' === get_locale() ) {
global_fonts_preload( 'Noto Kufi', 'arabic' );
} else {
/*
* translators: Font subset for your locale. Can be any of cyrillic,
* cyrillic-ext, greek, greek-ext, vietnamese, latin, latin-ext.
* Do not translate into your own language.
*/
$subsets = _x( 'latin', 'EB Garamond subsets, comma separated', 'wporg' );
// All headings.
global_fonts_preload( 'EB Garamond', $subsets );

if ( is_front_page() ) {
// The heading on the front-page has some italic.
global_fonts_preload( 'EB Garamond italic', $subsets );
}
}
}

Expand Down

0 comments on commit 2005646

Please sign in to comment.