Non-monoespaced fonts bug?

Solved bugs are moved into this topic...
Hobbes
Posts: 43
Joined: 17.05.2022 07:53

Non-monoespaced fonts bug?

Post 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 815 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!
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Post 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)?
Hobbes
Posts: 43
Joined: 17.05.2022 07:53

Post 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.
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Post 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".
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Post by main Alexey »

Can you post here (in the CODE tag) your settings/user.json ?
Hobbes
Posts: 43
Joined: 17.05.2022 07:53

Post 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.
Attachments
Tema 10_Motores monofásicos alterna.7z
Source
(5.86 KiB) Downloaded 44 times
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Post 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.
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Post 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.
Hobbes
Posts: 43
Joined: 17.05.2022 07:53

Post 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!
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Post 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.
Post Reply