unixwork / xnedit

A fast and classic X11 text editor, based on NEdit, with full unicode support and antialiased text rendering.
Other
83 stars 11 forks source link

Possible bug: rectangular selections are offset to the left #106

Closed cblc closed 1 year ago

cblc commented 1 year ago

I don't know if this is because I changed some resources, but when doing rectangular selections (dragging with the control key pressed), the rectangle is not at the cursor position, but offset to the left, as can be seen in this screen capture (you can see where the cursor is, and how the rectangle appeared to the left). Can you reproduce it? (if not, try to select a rectangle in the middle of the window rather than near of the left edge). Or is it only with my settings?

Captura de Pantalla 2023-05-24 a las 23 48 18
unixwork commented 1 year ago

I wasn't able to reproduce this. Does this happen every time?

It could be a font specific problem. I could try it with the same OS and font settings.

cblc commented 1 year ago

You are right, the default font works fine. Try the font called "Courier", and you will see...

cblc commented 1 year ago

Btw, I'm using XQuartz 2.8.5 on MacOS Ventura, if it matters.

cblc commented 1 year ago

I think there's something strange with italic fonts: in some fonts, the italics look like expanded (like with a whitespace between characters). But I think this happens when there's no explicit italics for a font. Maybe this is the reason for the Courier problem, because it's like it's applying this "expanded behaviour" when calculating the position of the rectangular selection even if in this font the italics look normally spaced (like you can see in the screenshot).

unixwork commented 1 year ago

Rectangular selections should work with the Courier font on macOS now (I think some other fonts were also affected)

cblc commented 1 year ago

Thank you very very much!! I'm building it right now...

cblc commented 1 year ago

I can confirm it: It is fixed!!!!! Thank you very very very much!!!