Ticket UUID: | 4476fd6144f5c9173d2e1de73769994b4f7d351 | |||
Title: | X11 clip region ignored for Xft text drawing | |||
Type: | Bug | Version: | 8.6.10 | |
Submitter: | chrstphrchvz | Created on: | 2020-08-22 02:48:50 | |
Subsystem: | 46. Unix Fonts | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Open | Last Modified: | 2023-07-17 20:31:38 | |
Resolution: | None | Closed By: | nobody | |
Closed on: | ||||
Description: |
A Tktable bug report from 2007 found that when Tk X11 8.5 was built with Xft support enabled, any text drawn was not clipped to the X clipping region. Tktable was previously using XSetClipRectangles() to clip text to table cells if text in the cell was "overflowing", i.e. too long to be drawn entirely within the cell. The workaround Tktable has since used is to draw to an offscreen pixmap, which at the time had an observable performance penalty on X11. To my knowledge an upstream Tk ticket was never filed for this issue, so I am opening one as the issue still exists in Tk 8.6.10 when forcing Tktable to use X clipping (by not defining NO_XSETCLIP in tkTable.c):
It seems Tk had to work around similar issues for core widgets, but I'm not sure those workarounds are applicable to programs/extensions like Tktable which use Tk_DrawTextLayout() directly. Maybe this issue is won't-fix. | |||
User Comments: |
fvogel added on 2023-07-17 20:31:38:
Now that we have an XSetClipRectangles() function working on all platforms, isn't it as straightforward as to instruct extensions to use it rather than their workaround? I must be missing something, sorry. Otherwise we could promote TkUnixSetXftClipRegion() to the Tk public interface? chrstphrchvz added on 2023-07-17 20:15:00: No, this problem persists despite [f9eddb541a]. The function TkUnixSetXftClipRegion(), which core Tk uses to work around this issue, is unavailable to extensions like Tktable. fvogel added on 2023-07-17 20:03:56: [f9eddb541a] solved this problem. I think we can close this ticket? fvogel added on 2023-07-16 20:32:55: See also [f9eddb541a]. fvogel added on 2023-07-15 12:09:55: See also [82b78e96f5]. |
