Incorrect Font for Japanese on windows and publish

Obsidian v1.2.8 (including Obsidian Publish site) appears to use an incorrect font for Japanese on Windows, both for the interface font and the text font (excluding the Monospace font). However, when I view aforementioned Obsidian Publish site from my iPad, I don’t experience any font problems, so it’s possible that iOS is not affected by this issue.

While the problem can be easily fixed by changing the font settings in Obsidian, it would be highly desirable for the issue to be resolved in order to better serve Japanese users.

For a more detailed explanation of the problem, please refer to the link below:
https://heistak.github.io/your-code-displays-japanese-wrong/

2 Likes

Was this always like this or is this a recent problem?

Also you did not follow the bug report template.

Thank you for your reply.
I am not sure if the issue has been occurring for a long time because I recently started using it.

I apologize for not following the template. I checked the template, but it doesn’t seem to fit my report. I believe that all the necessary information, including the link, is included.

Steps to reproduce

Select Japanese as the language in the settings.

Expected result

Japanese font is applied correctly.

Actual result

Incorrect font is being applied.

Environment

Obsidian v1.2.8 on Windows

Additional information

For a more detailed explanation of the problem, please refer to the link below:
https://heistak.github.io/your-code-displays-japanese-wrong/

ok, thanks.

I am also using Obsidian in Japanese, but I don’t have this issue on macOS and Android.
It could be that Windows system font is affected.

(The issue of confusion between Chinese and Japanese Kanji characters has existed for a long time in various services and applications. This is being corrected, but we need to keep up our voices…)

How do you fix the issue on windows? Which font do you have to pick? Or does it work with any font?

In the Japanese version of Windows, the commonly used fonts are “Yu Gothic” (游ゴシック) and “Meiryo” (メイリオ), as well as the interface fonts “Yu Gothic UI” and “Meiryo UI”. The UI fonts are narrow-width fonts designed for menu display.

Until Windows 8.1, the system fonts for the Japanese version of Windows were “Meiryo” and “Meiryo UI” for interface, but from Windows 10 onwards, they have been replaced with “Yu Gothic” and “Yu Gothic UI”. However, “Yu Gothic” itself seems to have been included as a standard font since Windows 8.1.

“Yu Gothic” is also available on Mac OS X Mavericks and later, making it a font that can be used on both Windows and Mac. However, there is no equivalent of “Yu Gothic UI” for Mac. And the font names are slightly different.

“Yu Gothic” is currently considered the best font, but for compatibility with Windows 8 and earlier, “Meiryo” is recommended.

Font details are as follows:

  • Yu Gothic: Windows 8.1 and later, Mac OS X Mavericks and later
  • Yu Gothic UI: Windows 10 and later
  • Meiryo: Windows Vista and later
  • Meiryo UI: Windows 7 and later

Notes on Yu Gothic:

  • The default weight is Regular on Windows and Medium on Mac, so it may become difficult to read on Windows if Medium is not specified.
  • The font names are slightly different between Windows and Mac:
    • English: “Yu Gothic” (Win) / “YuGothic” (Mac)
    • Japanese: “游ゴシック” (Win) / “游ゴシック体” (Mac)

Here is a sample of how it looks on Windows version Chrome.

.YuGothicMedium {
	font-family: "Yu Gothic Medium", "游ゴシック Medium";
	/* 	for compatibility with both Windows and Mac */
	/* font-family: "Yu Gothic Medium", "游ゴシック Medium", "YuGothic", "游ゴシック体"; */
}
.YuGothicRegular {
	font-family: "Yu Gothic", "游ゴシック";
}
.YuGothicUI {
	font-family: "Yu Gothic UI";
}
.Meiryo {
	font-family: "Meiryo", "メイリオ";
}
.MeiryoUI {
	font-family: "Meiryo UI";
}

4 Likes

I wonder what the font is in the screenshot above. I’m a Simplified Chinese user. However, when I set my Chrome browser language to Japanese, the font is correctly applied.

Since Obsidian is also based on Chromium, I suggest that the font auto-fallback follow Chrome’s style.

The font applied is likely set through CSS.

https://support.microsoft.com/en-us/topic/font-information-943ba11e-4cfc-40cf-91fc-206c1f12c760

Microsoft YaHei (微软雅黑 in Chinese) is a typeface designed for typesetting the Chinese language in the Simplified Chinese script.

As far as I can see, the font used on the above Obsidian Publish site and the font used on the Windows version of Obsidian (Japanese default) appear to be the same font.

1 Like

+1

This is the official Japanese help page, but the Japanese is not displayed correctly on Windows.

This is because Microsoft YaHei Light, a font for simplified Chinese characters, is used.

The kanji characters in Microsoft YaHei are those of Simplified Chinese, which are different from those of Japanese. The font also contains Japanese hiragana and katakana, which, however, look strange to Japanese users. (The two letters I highlighted are different characters, but they are very hard to distinguish in this font.)

Possible fixes are to simply stop using Microsoft YaHei Light, or to specify a different font that supports both Japanese and Chinese.

Hello, I am just writing to say that I have this issue on my system as well. System info:

1 Like

A kind user has provided us a CSS update to fix the Publish site. :slight_smile:

That’s me. (The names you see are different).

I simply removed Microsoft YaHei Light.

Hopefully my modifications will be incorporated into the defaults.

The help site has been fixed, but other users’ Publish sites remain unmodified. Do all Japanese Obsidian users have to customize their Publish CSS?

Also, I have not completely resolved the issue with the help site.
As for Interactive Graph, it still has the wrong font.

Related: Graph view should follow global "interface font"

I hope to eliminate Microsoft YaHei Light from Obsidian.

If it hasn’t already, can you make this a proper feature request for Publish? In either case, feel free to ping me in a reply so I can see what we can do quickly, if possible.