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
Fixes #146
  • Loading branch information
ryelle committed Aug 6, 2024
1 parent 9f39020 commit c8eb483
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions source/wp-content/themes/wporg-parent-2021/inc/rosetta-styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,34 @@ function get_locale_settings( $locale ) {
],
],
];
case 'ckb':
return [
'custom' => [
'heading' => [
'typography' => [
'fontFamily' => 'var(--wp--preset--font-family--noto-kufi)',
],
],
],
'typography' => [
'fontFamilies' => [
[
'fontFamily' => '"Noto Kufi Arabic", sans-serif',
'slug' => 'noto-kufi',
'name' => 'Noto Kufi Arabic',
],
// Unset courier-prime & anton, elements using these styles should fall back to Noto Kufi.
[
'fontFamily' => '',
'slug' => 'courier-prime',
],
[
'fontFamily' => '',
'slug' => 'anton',
],
],
],
];
}
return false;
}
Expand All @@ -130,5 +158,28 @@ function get_locale_styles( $locale ) {
return [
'css' => 'body { font-feature-settings: "palt"; }',
];
case 'ckb':
return [
// Force any inline inter styles to use Noto Kufi (used for global header, `.has-inter-font-family`, etc).
'css' => <<<CSS
* {
--wp--preset--font-family--inter: var(--wp--preset--font-family--noto-kufi) !important;
--wp--preset--font-family--eb-garamond: var(--wp--preset--font-family--noto-kufi) !important;
}
span.global-footer__code_is_poetry {
font-family: var(--wp--preset--font-family--noto-kufi) !important;
}
CSS,
'typography' => [
'fontFamily' => 'var(--wp--preset--font-family--noto-kufi)',
],
'blocks' => [
'core/button' => [
'typography' => [
'fontFamily' => 'var(--wp--preset--font-family--noto-kufi)',
],
],
],
];
}
}

0 comments on commit c8eb483

Please sign in to comment.