Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rosetta styles: Use Noto Serif JP for headings #455

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Jun 18, 2024

Noto Serif JP is being added to the available fonts with WordPress/wporg-mu-plugins#630 & WordPress/wporg-parent-2021#144. This PR updates the main site to use Noto Serif JP for headings.

The font preloading is also updated here, so that ja.w.org only preloads Noto Serif, not EB Garamond.

Screenshots

Before After
home-before home
download-before download
about-page-before about-page

How to test the changes in this Pull Request:

  1. Apply all three PRs across wporg-main-2022 (this one), Rosetta styles: Add Noto Serif for Japanese wporg-parent-2021#144, and Fonts: Add Noto Serif JP, faux cjk subset wporg-mu-plugins#630 (I know 😩)
  2. Follow the instructions to set up a non-English test instance, use Japanese to test with
  3. Once set up, view the frontend of the site
  4. All headings should use Noto Serif JP
  5. Noto Serif JP should be preloaded in the head tags
  6. Check on the default (english) site and/or other locales, they should still use EB Garamond

Note that EB Garamond does still load, it's hardcoded in the the global header site title. It might also appear if the font is set at the block level. We could override --wp--preset--font-family--eb-garamond with Noto Serif JP if it should be eradicated totally.

@ryelle ryelle added the i18n Translations, RTL issues label Jun 18, 2024
@ryelle ryelle self-assigned this Jun 18, 2024
@ryelle ryelle linked an issue Jun 18, 2024 that may be closed by this pull request
@StevenDufresne
Copy link
Contributor

The code looks fine across all the Pull Requests.

I haven't tested this on my sandbox due to the complexity of setting it up, but I'm comfortable with merging this.

Thanks 👍

Copy link
Contributor

@renintw renintw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks nice 👍 👍 I checked various pages (sandboxed), and they all applied the new font as shown in the screenshots. (However, I still need to add a backslash \ for it to work on my end.)
Except for the text "始めましょう" doesn't seem to have the new font applied (I saw in the screenshots that its font was also changed). Will there be a commit later to update this font?

image

--

ps. I couldn't test it locally as it kept showing this error on the homepage to me

Fatal error: Uncaught Error: Call to undefined method WP_HTML_Tag_Processor::next_token() in /var/www/html/wp-content/plugins/gutenberg/build/block-library/blocks/button.php:44 Stack trace: #0 /var/www/html/wp-includes/class-wp-block.php(258): gutenberg_render_block_core_button(Array, '\n

I'm pretty sure I've updated either node or composer packages to the latest version, have you also run into this, got stuck for a while 🫠

@ryelle
Copy link
Contributor Author

ryelle commented Jun 24, 2024

Except for the text "始めましょう" doesn't seem to have the new font applied (I saw in the screenshots that its font was also changed). Will there be a commit later to update this font?

Only places that currently use the "heading font" (EB Garamond) will be updated, if we need to change "始めましょう" it will need different CSS. I don't see that specifically requested in #432, though.

I couldn't test it locally as it kept showing this error on the homepage to me

I don't think I've seen that specifically, but maybe the WP version in the env is outdated? That doesn't update with node or composer packages, you can run wp-env start --update to update it.

@ryelle ryelle merged commit 76742fe into trunk Jun 24, 2024
2 checks passed
@ryelle ryelle deleted the update/rosetta-styles-jp branch June 24, 2024 19:27
@renintw
Copy link
Contributor

renintw commented Jun 26, 2024

Except for the text "始めましょう" doesn't seem to have the new font applied (I saw in the screenshots that its font was > also changed). Will there be a commit later to update this font?

Only places that currently use the "heading font" (EB Garamond) will be updated, if we need to change "始めましょう" it will need different CSS. I don't see that specifically requested in #432, though.

Ah, what I meant was that in the screenshots you provided, the font (or maybe just the size?) of "始めましょう" looks different. That's why I was wondering if there might be some changes that weren't applied in the code.

image

I couldn't test it locally as it kept showing this error on the homepage to me

I don't think I've seen that specifically, but maybe the WP version in the env is outdated? That doesn't update with node or composer packages, you can run wp-env start --update to update it.

It doesn't seem to be a WordPress version issue. After deleting gutenberg and reinstalling, it worked. The previous composer update that I've run might not have successfully updated gutenberg somehow, possibly the local environment was polluted.

I also tried cloning a new repo and building from scratch, and the error didn't show up, but t here's another error:

cURL error 35: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to wordpress.org:443 ✔ Ran `php env/import-content.php --url https://wordpress.org/wp-json/wp/v2/posts?context=wporg_export&per_page=50` in 'cli'. (in 1s 526ms)

This caused the content to not be imported, resulting in a 404 error on the initial visit to the homepage (this can be resolved by adjusting the Reading Settings, though).

Have you run into this, possibly a proxy issue I presume?

@ryelle
Copy link
Contributor Author

ryelle commented Jun 26, 2024

Ah, what I meant was that in the screenshots you provided, the font (or maybe just the size?) of "始めましょう" looks different. That's why I was wondering if there might be some changes that weren't applied in the code.

Oh, I think my before screenshot was not quite up to date, it was missing this change to shrink the CTA font size.

Have you run into this, possibly a proxy issue I presume?

Sounds like a proxy issue to me, but I don't think I've run into that exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Translations, RTL issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adjustments in the Japanese version
3 participants