Menu

#205 Text tool cursor not aligned with text itself

v1.0_(example)
open
nobody
None
5
2023-04-25
2019-01-30
Tortugo
No

Hi!
When you try to use the text tool and you clic on the page, the text is not aligned with the cursor itself. So, it is not possible to predict where the text will be written.

(See the screenshot)

Thanks a lot!

1 Attachments

Discussion

  • Denis Auroux

    Denis Auroux - 2019-01-30

    I'm aware of the problem. It's not very easy to fix, because the cursor size is not necessarily the size of the text anyway to begin with.

    Basically, right now, the bottom edge of your cursor will end up being the top-left corner of the text box. I agree this is annoying and just about the worst possible choice of behavior.

    Denis

     
  • Tortugo

    Tortugo - 2019-01-30

    Thanks for your suggestion. I'll try to do.

    I hope you can solve this issue in the future.

    Thanks a lot for this great and useful application. ;)

     
  • James C.

    James C. - 2023-04-20

    On my platform (Trisquel 11, Xournal 0.4.8.2016), the active spot on the text cursor is (correctly) in the vertical middle, and the top left corner of the text box is immediately to the right of the I-beam.

    On my platform, the largest cursor is 256x256, so in principle, there could be a variety of text cursors, depending on the text size and magnification, including something to indicate text larger than the largest cursor. I think that, to make this sensible, they would have to be procedurally generated. I suggest that this is outside the minimal scope of the bug.

    Within the minimal scope of the bug, if the displayed size (font size / resolution) of the text box is known before displaying it, then the vertical middle of the text box could be placed near the active spot.

     
    • Denis Auroux

      Denis Auroux - 2023-04-20

      I'm increasingly thinking that the simplest solution would be to change
      the text tool cursor to something else (a pointer with a little 'T' next
      to it?) that doesn't look like a text I-beam, so as to not suggest an
      alignment that doesn't exist...

      (Ideally we'd have better-looking and more appropriately sized cursors
      altogether, but the GTK2 function we use for handling cursors is rather
      limited, and I don't have the energy to devote to this...)

      Denis

       
      • James C.

        James C. - 2023-04-25

        My minimal fix is here:
        https://github.com/xournal/xournal/pull/6

        Imagining that Xournal code-fix is my current form of entertainment, and that I have some ideas about variable-sized cursors, what bug would you prefer that I was looking at?

         

Log in to post a comment.