-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Chinese font not rendered with the correct font variation #3253
Comments
I tried editing the CSS for both joplin and markdown and it seems |
I can't replicate on macOS. Just to be sure could you check with 1.0.216? I assume it still happens but worth checking anyway. |
Yeah, on 1.0.216 same thing happens. |
I checked the same notes synced on the Android app and the characters display correctly. So it seems this problem is limited to Windows right now. |
I don't know enough about this to fix the issue. I've tried setting "font-variant-east-asian" to various values, but that didn't change anything. If you have some idea of what CSS should be applied to fix the issue, please let me know. |
Okay, so I tried some more custom CSS, and I have a hacky solution for the rendered-markdown window. The editor window is still unresolved. It looks like part of the problem is the default font. What is the default font Joplin uses for the rendered markdown? Was it changed/hard-coded between the two versions? Rendered-markdown WindowWhen I force the font in the the CSS (either in the note or in userstyle.css), it actually does work to change it to the correctly localized variant:
Although this doesn't match the default font of Joplin, I could live with this in the rendered window since it's my default font for Chinese in Windows. Latin-based texts don't look very good, but a cumbersome solution is to set a custom Editor WindowNow, there is the editor window to deal with. If I force the editor font family to be "Microsoft Yahei", it screws up the cursor completely in the text. That is, in the following photo, I'm selecting all of and only the Chinese text in the final line. (There are no real spaces at the end of that line.) |
Okay, update. I decided to checkout and build a few of the commits between 1.0.207 and 1.0.209, and I have identified that fa76c5d as the commit when the regression first takes place. Unfortunately, the only change in that commit is upgrading Electron from 7.1.12 to 8.2.5. Which means it's either out of Joplin's hands or something with the fonts is misconfigured for Electron 8. With a cursory search, I have not found any Electron issues directly related to font-variant-east-asian. |
Amazing, as of 1.5.7, the all issues seem to be resolved. I know that there were some big UI changes between the versions and when I have some time I will investigate which version it was that fixed the issue. In the meantime this issue can be closed. |
This issue was fixed between versions 1.4.10 and 1.4.11. In the changelog for 1.4.11, "Improved: Upgrade to Electron 10" was listed. This is likely a bug with Electron and not Joplin. I'm not going to investigate further right now to confirm, but possibly this PR was the fix: electron/electron/pull/23247 |
There is a regression that happens between versions 1.0.207 and 1.0.209 (tested with the same text). Chinese characters in 1.0.207 were rendered correctly under the zh-CN mainland standard. By 1.0.209 the same exact text renders improperly.
(This seems to be a very similar issue to that was resolved in Windows Terminal recently microsoft/terminal#4508)
Environment
Joplin version: 1.0.209
Platform: Windows
OS specifics: Windows 10 64-bit Build 18363
Steps to reproduce
1.0.207:
1.0.209:
The text was updated successfully, but these errors were encountered: