BoostIO / BoostNote-Legacy

This repository is outdated and new Boost Note app is available! We've launched a new Boost Note app which supports real-time collaborative writing. https://github.com/BoostIO/BoostNote-App
Other
17.07k stars 1.47k forks source link

The way of solving incorrect font used for some Chinese characters #3681

Closed wu-yue-yu closed 3 years ago

wu-yue-yu commented 3 years ago

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.

Originally posted by @hkunzhe in https://github.com/BoostIO/Boostnote/issues/3393#issuecomment-564845378

wu-yue-yu commented 3 years ago

Using this font, can deal with this problem. Consolas-with-Yahei Could add this font to the software? This is the best way to maek Chinese characters and other characters compatible. Thanks for reading this.

wu-yue-yu commented 3 years ago

Using this font, can deal with this problem. Consolas-with-Yahei Could add this font to the software? This is the best way to maek Chinese characters and other characters compatible. Thanks for reading this.

The font includes boldItalic and bold Italic.