onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.84k stars 282 forks source link

Can't render CJK font on small screen? #2561

Open luciffer opened 4 years ago

luciffer commented 4 years ago

I've installed 0.5.1-nightly on three PCs, one on desktop with win10, one on surface go with win10 and one on xps13 with manjaro. The configurations about fonts are all the same.

"editor.fontFamily": "Sarasa Mono SC",

but this font seems are rendered differently on devices, this is on desktop and works as expected Oni2_editor_iW6gdZhFJm but on other two devices, font are totally broken.

BA88BBA6-C0B4-4d64-B9BD-91CB52C54239

This is the link to the fonts, https://github.com/be5invis/Sarasa-Gothic

bryphe commented 4 years ago

Wow, strange - thanks for testing across your devices @luciffer and including the screenshots!

I tried on my Manjaro box using Sarasa Mono SC - but it didn't reproduce for me. It seems from the screenshot we're not resolving glyphs properly in the failing scenario (maybe a bug with shaping).

A few questions to try and narrow this down:

1) Would it be possible to upload the configuration.json that's reproducing it? Just wondering if there is possibly some encoding bug being hit.

2) Would it be possible to get the trace logs? On the Manjaro box, with the AppImage, you can run ./Onivim-x86_x64-master.AppImage -f --trace --log-file=trace.log, and then open up the configuration file that is having issues.

The --trace log setting is very verbose, and logs out the results of all our 'text shaping' operations - so it could give us a clue where in the pipeline things are breaking down. The log file would show details on the entire text-shaping process.

3) Does this reproduce for other fonts, like Noto Sans CJK?

luciffer commented 4 years ago
  1. This is the json file.

configuration.zip

  1. And trace log. trace.log

  2. I don't have time to install Noto fonts today, I'll try that this weekend.

Considering this weird thing happens on my surface go too, I think this bug is unrelated to OS?