-
Notifications
You must be signed in to change notification settings - Fork 86
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
CJK characters overlapping and performance issues in cosmic-term #325
Comments
@MoSal this looks right |
Cool. That was rendered using GNU Unifont, which may not look great, but it has the advantage of supporting many scripts, and can be used for fallback purposes only. If there are other free redistributable monospace fonts that support these scripts, I would like to know about them. If no monospace fonts with the needed script support are available, falling back to non-monospace Noto CJK fonts should reliably work (a potential issue with Japanese scripts was fixed in pop-os/cosmic-text#314). Other than not being monospace (not using full line width), this is also rendered correctly, right? Do you get the same results with Noto CJK fonts available, then with GNU Unifont available? |
@MoSal The problem is that my system has multiple monospace fonts that support these characters, but each character ends up using a different font. Yes,that is rendered correctly. |
Can you run the terminal like this:
and post the relevant log output? |
Default font is Source Code Pro |
Log[2024-08-31T04:19:15Z TRACE cosmic_text::shape] Evaluating fallback with font 'SauceCodePro Nerd Font' |
Basically, how things work is that If a monospace font (or more) supports every glyph, it will be chosen. Otherwise, the font that supports most requested glyphs will be picked, and the fallback process continues for what remains, until none are left that are supported by any monospace font. Non-monospace fonts will be tried if anything remains. In this case, a lot of glyphs are supported by the monospace font "D2CodingLigature Nerd Font Mono". But many glyphs are not supported by it. A small number is picked up by "M+1Code Nerd Font Mono". But some are not supported by any monospace font and needed to fallback to "Noto Sans CJK SC". Fallbacking to multiple monospace fonts shouldn't be and issue, as fonts are resized to match a single width ( The Katakana text may need the fix from pop-os/cosmic-text#314. So possible thing that can be tried:
It's probably not relevant here, but there is also an issue where some monospace fonts are not explicitly flagged (and thus detected) as such. I will propose a solution for that in |
Character Overlap:
CJK characters are displaying with overlap, making the text difficult to read and navigate.
cosmic-term:
Alacrity(expected):
Steps to Reproduce:
Open cosmic-term or cosmic-edit
Input or past text containing CJK characters
Performance
There is a noticeable lag when initially rendering a large number of CJK characters,which might be related to font loading.
text file in screenshot
log file when use
RUST_LOG=cosmic_text=trace cargo run --release
to run terminal and run 'cat text.txt' in the cosimic term.log.txt
The text was updated successfully, but these errors were encountered: