Skip to content

Commit

Permalink
Rosetta styles: Japanese: Preload Noto Serif JP instead of EB Garamond
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Jun 18, 2024
1 parent 13409da commit ada4c69
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions source/wp-content/themes/wporg-main-2022/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,16 @@ function enqueue_assets() {
$subsets = 'latin';
}

// All headings.
global_fonts_preload( 'EB Garamond', $subsets );
if ( 'ja' === get_locale() ) {
global_fonts_preload( 'Noto Serif JP', 'cjk' );
} else {
// 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 );
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 ada4c69

Please sign in to comment.