Tk Source Code

View Ticket
Login
2023-07-17
20:31 Ticket [4476fd61] X11 clip region ignored for Xft text drawing status still Open with 3 other changes artifact: f3c2ef21 user: fvogel
20:15 Ticket [4476fd61]: 3 changes artifact: 67a2fa56 user: chrstphrchvz
20:03 Ticket [4476fd61]: 3 changes artifact: 7998b07c user: fvogel
2023-07-16
20:32 Ticket [4476fd61]: 3 changes artifact: 2eebb715 user: fvogel
2023-07-15
12:09 Ticket [4476fd61]: 3 changes artifact: 502a85d6 user: fvogel
12:07 Ticket [82b78e96] #define CLIPPING_IS_WORKING in revised_text status still Open with 4 other changes artifact: 06e5b7ec user: fvogel
2023-07-11
01:55 Ticket [81965cf8] Revised text displays fuzzy text on OSX high resolution displays status still Open with 3 other changes artifact: 40c8751c user: chrstphrchvz
2020-08-22
02:49 Ticket [b505e5f6] Aqua: possible to implement XSetClipRectangles()? status still Closed with 5 other changes artifact: aa7c4f33 user: chrstphrchvz
02:48 New ticket [4476fd61] X11 clip region ignored for Xft text drawing. artifact: d9c61a9e user: chrstphrchvz

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].