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

Incorrect font used for some Chinese characters #3393

Open
hkunzhe opened this issue Dec 11, 2019 · 10 comments
Open

Incorrect font used for some Chinese characters #3393

hkunzhe opened this issue Dec 11, 2019 · 10 comments
Labels
bug 🐛 Issue concerns a bug. level 1 ❕ A bug that caused minor damage: App is still usable, but minor features might not work.

Comments

@hkunzhe
Copy link

hkunzhe commented Dec 11, 2019

Current behavior

Some Chinese words doesn't render normally in preview area and other area except code editor.
image

My own setting for Editor Font Family is "Hack", "Source Han Sans CN Medium", and the same for Preview Font Family.

As the screenshoot shown that "修改与分类“ doesn't render normally as code editor area.

Expected behavior

The font family in the preview area should be render as set in the preferences Preview Font Family.

Steps to reproduce

  1. Set both Editor Font Family and Preview Font Family to "Hack", "Source Han Sans CN Medium".
  2. Type some Chinese words, like "修改与分类“.
  3. Watch out note list area and preview area.

Environment

  • Version : v0.13.0
  • OS Version and name : Manjaro Linux
@hkunzhe
Copy link
Author

hkunzhe commented Dec 11, 2019

It seems that the mis-rendering font family is Sans Regular in my Manjaro Linux,which is probably set by default.
image

So how can I customize it?

@Flexo013
Copy link
Contributor

The characters seem to render just fine in the screenshot provided. They are merely pushed to the next line due to lack of space.

As for the font, I can't quite tell the difference between the fonts, so I have no clue if the correct font is used. Could you maybe provide a side by side of the the character in the wrong font and in the right font?

Note: I could be mistaken, since I don't know any Chinese.

@Flexo013 Flexo013 added the needs investigation 🔬 Issue requires further investigation to locate or narrow down the problem. label Dec 11, 2019
@hkunzhe
Copy link
Author

hkunzhe commented Dec 12, 2019

@Flexo013 , thanks for your reply.
image

The character above is "分" rendered by previous area, and the character below is "分" rendered by text editor area (it correctly render by Source Han Sans CN Medium). There is slightly difference as the sreenshoot shown, but I have set the same font "Hack", "Source Han Sans CN Medium" for both Editor Font Family and Preview Font Family.

I have very little knowledge about web development. I think the reason is probably caused by the style sheet below

@font-face {
      font-family: 'OpenSans';
      src: url('../resources/fonts/Lato-Regular.woff2') format('woff2'), /* Modern Browsers */
      url('../resources/fonts/Lato-Regular.woff') format('woff'), /* Modern Browsers */
      url('../resources/fonts/Lato-Regular.ttf') format('truetype');
      font-style: normal;
      font-weight: normal;
      text-rendering: optimizeLegibility;
    }

Therefore, changing Previous Font Family in preferences doesn't take effect.

@Flexo013 Flexo013 added bug 🐛 Issue concerns a bug. level 1 ❕ A bug that caused minor damage: App is still usable, but minor features might not work. and removed needs investigation 🔬 Issue requires further investigation to locate or narrow down the problem. labels Dec 12, 2019
@Flexo013 Flexo013 changed the title Some Chinese words doesn't render normally on Manjaro Linux Incorrect font use for some Chinese characters Dec 12, 2019
@Flexo013 Flexo013 changed the title Incorrect font use for some Chinese characters Incorrect font used for some Chinese characters Dec 12, 2019
@Sshzh
Copy link

Sshzh commented Jan 14, 2020

老哥,问一下怎么从编辑器里修改字体啊,我试了试
image直接这样输入好像修改不了

@Flexo013
Copy link
Contributor

@Sshzh Could you provide English information? That way other can more easily pick up this issue.

@Sshzh
Copy link

Sshzh commented Jan 14, 2020

@Flexo013 Sorry about this, I just want to ask him a question and I'm not good at English.That's why I used Chinese.....
I didn't find any specific description about the font settings,so I try to put the font's name in the input field.
image
However this setting does not take effect, so I want to know how can I set the font correctly. thanks!

@hkunzhe
Copy link
Author

hkunzhe commented Jan 14, 2020

@Sshzh, Try to set the value to "Consolas", "Source Han Sans CN Normal" and it should work. Maybe you have to change "Source Han Sans CN Normal" to "Microsoft YaHei" if you are using Windows.

@Sshzh
Copy link

Sshzh commented Jan 14, 2020

@hkunzhe It's still not working....

@hkunzhe
Copy link
Author

hkunzhe commented Jan 14, 2020

@Sshzh Please check if you have installed Consolas and Microsoft YaHei by doing fc-list.

@Sshzh
Copy link

Sshzh commented Jan 15, 2020

Yes I have installed them,but still not working ... I have given up ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Issue concerns a bug. level 1 ❕ A bug that caused minor damage: App is still usable, but minor features might not work.
Projects
None yet
Development

No branches or pull requests

3 participants