Page 1 of 2

Non-monoespaced fonts bug?

Posted: 17.05.2022 08:11
by Hobbes
Hi,

I've started to use CudaText (as alternative to Notepad++) and I'm still struggling with interface and lexers configurations. Changing the font type I've found some weird text rendering (see the image) with non-monospaced fonts.
Calisto MT test.png
Calisto MT test.png (9.63 KiB) Viewed 834 times
Sorry, the text is in Spanish, but still you can see the voids and overlappings in the words.

Is that a bug? or is a configuration problem.

Thanks!

Posted: 17.05.2022 09:14
by main Alexey
Non-monospaced fonts need the Cud 1.164 or newer, seems you use the older version?
For what OS?
What font name (I may try it)?

Posted: 17.05.2022 12:29
by Hobbes
Sorry, I didn't give the details.

OS - Windows 10.
Cud version - 1.165.
Font - Calisto MT (but I have the same problem with others, like Palatino Lynotype).

Edit.
It seems that if text wrap is activated the rendering is ok.

Posted: 17.05.2022 17:25
by main Alexey
I will try on Win10 later.
Now I tried on Ubuntu 20. I got font from https://allshrift.ru/font/calisto-mt/

App looks totally OK!
Tested on some C++ file in wrap=off and wrap=on.
https://imgur.com/PZNseUd

EDIT
Tested on Wine on Linux: totally OK too.

EDIT2
Try to turn the option "font_ligatures" on/off.
Try to reset option "renderer_tweaks".

Posted: 17.05.2022 17:37
by main Alexey
Can you post here (in the CODE tag) your settings/user.json ?

Posted: 17.05.2022 19:02
by Hobbes
Here ar the settings:

Code: Select all

{
  "font_name" : "Calisto MT",
  "font_size" : 12,
  "ui_theme" : "",
  "ui_theme_syntax" : "",
  "ui_statusbar_panels" : "caret,C,180|enc,C,125|ends,A,45|lexer,C,100|tabsize,A,75|wrap,A,75|zoom,A,75|selmode,A,15|msg,L,4000",
  "bracket_highlight" : true,
  "bracket_symbols" : "()[]{}",
  "wrap_enabled_max_lines" : 60000,
}
And attached I send you the HTML file I'm working with. All looks fine for me except line 147 (the image of my first post).

"font_ligatures" and "renderer_tweaks" has no effect in that line.

Posted: 17.05.2022 19:43
by main Alexey
that is different situation - when ONLY ONE line is looking bad! I solved it then! the reason is long length ~580 chars and option value "max_line_len_for_accurate_width":500 . Just set option to e.g. 1000.

Posted: 17.05.2022 19:48
by main Alexey
I see new issue anyway - on that line, in that HTML file, ending characters are missing (looks like lot of spaces). I will study this.
the temp solution - switch to monospaced font.

Posted: 17.05.2022 20:16
by Hobbes
In other HTML files I have this problem in several lines, but all of them are very long ones, so the solution is the same.

I've checked the file with other editor and seems it's ok (no missing characters), but I not sure. I'm quite new with XHTML/HTML (maybe my files are not the best for testing editors issues).

Thank you very much for your help!

Posted: 17.05.2022 20:49
by main Alexey
your files are fully correct! Good that you tested on them.
about 'missing chars at line end' - ie about 2nd bug - it is fixed today in my local code.
now for line length > "max_line_len_for_accurate_width" chars will be rendered not nice but will be visible.