Bug#347790: xterm: boldMode patch
Hi, thanks for the feedback!
On Sun, Mar 19, 2006 at 09:24:46AM -0500, Thomas Dickey wrote:
> I agree that it should do what you're describing, but the patch is applied
> before xterm has found the data that it needs to do the boldMode feature.
> For instance, on the next line (see the context of the patch) it checks to
> see if it was able to derive a bold font specifier. Later it checks if
> that was different from the normal (or font1, etc) font.
I see some problems with my previous approach, most notably a
potential memory leak I'm not sure how I missed. Here's a second
attempt. Perhaps you can tell me if I'm on the right track. Is this
how you would go about it?
Thanks,
Tim Pope
--- fontutils.c 2006-03-14 15:14:11.000000000 -0600
+++ fontutils.c.dealloc-later 2006-03-19 14:29:02.000000000 -0600
@@ -789,6 +789,12 @@
bfs = nfs;
}
+ if (!screen->bold_mode && bfs != nfs) {
+ TRACE(("...ignoring bold font, as per boldMode\n"));
+ XFreeFont(screen->display, bfs);
+ bfs = nfs;
+ }
+
if_OPT_WIDE_CHARS(screen, {
if (wfs != 0
&& wbfs != 0
Reply to: