Re: [Interest] Make a specific Unicode glyph wider in a QTextLayout

2024-12-16 Thread Eskil Abrahamsen Blomfeldt via Interest
qt.io From: Interest on behalf of Wang Gary Sent: Sunday, December 15, 2024 8:23 AM To: interest@qt-project.org Subject: [Interest] Make a specific Unicode glyph wider in a QTextLayout Hi, I'm attempting to implement a feature in a plain text editor that similar to N

Re: [Interest] Make a specific Unicode glyph wider in a QTextLayout

2024-12-15 Thread Wang Gary
> But since you want to edit it, it is probably too cumbersome. Of your two > suggested approached I think the QTextLayout has the best chance of working. So do you mean subclassing QTextLayout and accessing the private APIs? I also think it might be the way to do so but I'm just not sure if that'

Re: [Interest] Make a specific Unicode glyph wider in a QTextLayout

2024-12-15 Thread Allan Sandfeld Jensen
On Sunday 15 December 2024 18:07:46 Central European Standard Time Wang Gary wrote: > Hi again, > > > > > Replace the non-visible character in the model with a visible one in > > > > the > > > > view? > > > > > > Well, there are some reasons that I personally would like to avoid > > > that. Firs

Re: [Interest] Make a specific Unicode glyph wider in a QTextLayout

2024-12-15 Thread Wang Gary
Hi again, > > > Replace the non-visible character in the model with a visible one in the > > > view? > > Well, there are some reasons that I personally would like to avoid > > that. Firstly this > > feature itself is more of a view-level function, modifying the model > > sounds weird[1]. > My sugg

Re: [Interest] Make a specific Unicode glyph wider in a QTextLayout

2024-12-15 Thread Allan Sandfeld Jensen
On Sunday 15 December 2024 15:56:53 Central European Standard Time Wang Gary wrote: > > > So the question is, what's the proper approach to implement such a > > > feature > > > using Qt's public API? Do the mentioned two approaches sound right? > > > > Replace the non-visible character in the mod

Re: [Interest] Make a specific Unicode glyph wider in a QTextLayout

2024-12-15 Thread Wang Gary
> > So the question is, what's the proper approach to implement such a feature > > using Qt's public API? Do the mentioned two approaches sound right? > > > Replace the non-visible character in the model with a visible one in the view? Well, there are some reasons that I personally would like to a

Re: [Interest] Make a specific Unicode glyph wider in a QTextLayout

2024-12-15 Thread Allan Sandfeld Jensen
On Sunday 15 December 2024 08:23:50 Central European Standard Time Wang Gary wrote: > Hi, > > I'm attempting to implement a feature in a plain text editor that similar > to Notepad++'s "show hidden characters", which allows toggle the visibility > of non-printable characters, like zero-width spac

[Interest] Make a specific Unicode glyph wider in a QTextLayout

2024-12-14 Thread Wang Gary
Hi, I'm attempting to implement a feature in a plain text editor that similar to Notepad++'s "show hidden characters", which allows toggle the visibility of non-printable characters, like zero-width space, CR LF and so-on, which look like this in Notepad++ (see the attachment for the sample docume