contour-terminal / contour

Modern C++ Terminal Emulator
http://contour-terminal.org/
Apache License 2.0
2.37k stars 102 forks source link

Fails to display Japanese characters #1340

Closed ghost closed 9 months ago

ghost commented 9 months ago

Contour Terminal version

0.3.12

Installer source

something else (please specify below)

Operating System

Artix Linux Rolling

Architecture

x86-64

Other Software

noto-fonts 1:23.11.1-1

Steps to reproduce

Attempt to read any Japanese characters

Expected Behavior

Japanese characters mostly display correctly:

image

(from kitty)

Actual Behavior

no Japanese text displays: image

Additional notes

No response

Yaraslaut commented 9 months ago

Hi @binex-dsk, thanks for reporting this issue, can you please provide also output of contour debug font.locator,font.textshaping ? while shaping Japanese characters

christianparpart commented 9 months ago

Also, try setting monospsce to false in there configuration. That should hopefully fix it for you

ghost commented 9 months ago

Weirdly enough, when I ran with contour debug, the new terminal had a weird spaced out font, but did display Japanese characters:

image

The terminal outputs this a bunch of times:

[2023-11-20 11:57:04.143972] [font.textshaping] Try fallbacks font key:2, source: path /usr/share/fonts/noto/NotoSans-Italic.ttf Regular Italic
[2023-11-20 11:57:04.143990] [font.textshaping] Try fallbacks font key:5, source: path /usr/share/fonts/noto/NotoSansMono-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144005] [font.textshaping] Try fallbacks font key:6, source: path /usr/share/fonts/gnu-free/FreeMono.otf Regular Roman
[2023-11-20 11:57:04.144018] [font.textshaping] Try fallbacks font key:7, source: path /usr/share/fonts/gnu-free/FreeSans.otf Regular Roman
[2023-11-20 11:57:04.144035] [font.textshaping] Try fallbacks font key:8, source: path /usr/share/fonts/OTF/Font Awesome 6 Brands-Regular-400.otf Regular Roman
[2023-11-20 11:57:04.144050] [font.textshaping] Try fallbacks font key:9, source: path /usr/share/fonts/OTF/Font Awesome 6 Free-Regular-400.otf Regular Roman
[2023-11-20 11:57:04.144065] [font.textshaping] Try fallbacks font key:10, source: path /usr/share/fonts/TTF/fa-v4compatibility.ttf Regular Roman
[2023-11-20 11:57:04.144079] [font.textshaping] Try fallbacks font key:11, source: path /usr/share/fonts/gnu-free/FreeSerif.otf Regular Roman
[2023-11-20 11:57:04.144094] [font.textshaping] Try fallbacks font key:12, source: path /usr/share/fonts/noto/NotoNastaliqUrdu-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144110] [font.textshaping] Try fallbacks font key:13, source: path /usr/share/fonts/noto/NotoSansWarangCiti-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144126] [font.textshaping] Try fallbacks font key:14, source: path /usr/share/fonts/noto/NotoSansAdlam-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144140] [font.textshaping] Try fallbacks font key:15, source: path /usr/share/fonts/noto/NotoSansDuployan-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144160] [font.textshaping] Try fallbacks font key:16, source: path /usr/share/fonts/noto/NotoSansMath-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144174] [font.textshaping] Try fallbacks font key:17, source: path /usr/share/fonts/noto/NotoSerifTangut-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144190] [font.textshaping] Try fallbacks font key:18, source: path /usr/share/fonts/noto/NotoKufiArabic-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144206] [font.textshaping] Try fallbacks font key:19, source: path /usr/share/fonts/noto/NotoSansMyanmar-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144221] [font.textshaping] Try fallbacks font key:20, source: path /usr/share/fonts/noto/NotoSansGujarati-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144237] [font.textshaping] Try fallbacks font key:21, source: path /usr/share/fonts/noto/NotoSansMalayalam-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144252] [font.textshaping] Try fallbacks font key:22, source: path /usr/share/fonts/noto/NotoSerifTibetan-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144266] [font.textshaping] Try fallbacks font key:23, source: path /usr/share/fonts/noto/NotoSansEthiopic-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144281] [font.textshaping] Try fallbacks font key:24, source: path /usr/share/fonts/noto/NotoSansHanifiRohingya-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144295] [font.textshaping] Try fallbacks font key:25, source: path /usr/share/fonts/noto/NotoSansLisu-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144309] [font.textshaping] Try fallbacks font key:26, source: path /usr/share/fonts/noto/NotoSansSoraSompeng-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144323] [font.textshaping] Try fallbacks font key:27, source: path /usr/share/fonts/adobe-source-code-pro/SourceCodePro-Regular.otf Regular Roman
[2023-11-20 11:57:04.144339] [font.textshaping] Try fallbacks font key:28, source: path /usr/share/fonts/noto/NotoSansArmenian-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144353] [font.textshaping] Try fallbacks font key:29, source: path /usr/share/fonts/noto/NotoSansSymbols2-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144367] [font.textshaping] Try fallbacks font key:30, source: path /usr/share/fonts/noto/NotoSansNewa-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144381] [font.textshaping] Try fallbacks font key:31, source: path /usr/share/fonts/noto/NotoSerifAhom-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144395] [font.textshaping] Try fallbacks font key:32, source: path /usr/share/fonts/noto/NotoSerifSinhala-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144409] [font.textshaping] Try fallbacks font key:33, source: path /usr/share/fonts/noto/NotoSansLepcha-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144424] [font.textshaping] Try fallbacks font key:34, source: path /usr/share/fonts/noto/NotoSansSharada-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144438] [font.textshaping] Try fallbacks font key:35, source: path /usr/share/fonts/noto/NotoSansTifinagh-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144453] [font.textshaping] Try fallbacks font key:36, source: path /usr/share/fonts/noto/NotoSansZanabazarSquare-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144468] [font.textshaping] Try fallbacks font key:37, source: path /usr/share/fonts/noto/NotoSansCaucasianAlbanian-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144482] [font.textshaping] Try fallbacks font key:38, source: path /usr/share/fonts/noto/NotoSansJavanese-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144496] [font.textshaping] Try fallbacks font key:39, source: path /usr/share/fonts/noto/NotoSansKaithi-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144510] [font.textshaping] Try fallbacks font key:40, source: path /usr/share/fonts/noto/NotoSansKannada-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144525] [font.textshaping] Try fallbacks font key:41, source: path /usr/share/fonts/noto/NotoSansKhojki-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144539] [font.textshaping] Try fallbacks font key:42, source: path /usr/share/fonts/noto/NotoSansManichaean-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144554] [font.textshaping] Try fallbacks font key:43, source: path /usr/share/fonts/noto/NotoSansOldHungarian-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144569] [font.textshaping] Try fallbacks font key:44, source: path /usr/share/fonts/noto/NotoSansOriya-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144583] [font.textshaping] Try fallbacks font key:45, source: path /usr/share/fonts/noto/NotoSansSiddham-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144598] [font.textshaping] Try fallbacks font key:46, source: path /usr/share/fonts/noto/NotoSansSignWriting-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144613] [font.textshaping] Try fallbacks font key:47, source: path /usr/share/fonts/noto/NotoSansSundanese-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144628] [font.textshaping] Try fallbacks font key:48, source: path /usr/share/fonts/noto/NotoSansTakri-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144642] [font.textshaping] Try fallbacks font key:49, source: path /usr/share/fonts/noto/NotoSansTelugu-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144657] [font.textshaping] Try fallbacks font key:50, source: path /usr/share/fonts/noto/NotoSerifBalinese-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144671] [font.textshaping] Try fallbacks font key:51, source: path /usr/share/fonts/noto/NotoSerifKhojki-Regular.ttf Regular Roman
[2023-11-20 11:57:04.144685] [font.textshaping] Try fallbacks font key:52, source: path /usr/share/fonts/noto-cjk/NotoSansCJK-Regular.ttc Regular Roman
ghost commented 9 months ago

Setting the font family to Noto Sans Mono and disabling strict_spacing fixes it.

I think this is an issue with the hot config reload, as I had it set before and the hot config reload didn't reset the font. Only when I closed and reopened contour did this change the font.

Yaraslaut commented 9 months ago

It might be that live config is not working at the moment :(

Yaraslaut commented 9 months ago

@binex-dsk if issue is not resolved after changing config file you need to show full output of contour debug font.locator,font.textshaping

ghost commented 9 months ago

I sent it here https://github.com/contour-terminal/contour/issues/1340#issuecomment-1819461137

The issue is resolved, Japanese text is displayed properly now. The issue is related to live reload.

christianparpart commented 9 months ago

@binex-dsk many thanks for the patience.

The issue is related to live reload.

We'll be working on that (and configuration in general) in the near future. so I'm quite confident it won't take too long to get that in.

Mind, live reload should be working, but while I was implementing it, I didn't think it might make sense for a few settings. Turns out it does most of all. Give us some time. Enjoy. ;-)

ghost commented 9 months ago

Thanks! I'll close this issue.