Skip to content

Instantly share code, notes, and snippets.

@taviso
Last active Feb 1, 2021
Embed
What would you like to do?
Enable Xft support in XTerm Menus
! Set the default XTerm UI font (menus, toolbar, etc)
XTerm*XftFont: Courier:size=10:antialias=true:style=Regular
! All my resources are available here (I disable the Xaw3D effect, I think it looks a bit dated!)
! https://gist.github.com/taviso/a4543b1752fba55017e8fcc2fe052c0a
! It looks like this: https://imgur.com/a/m2PGuuz
!
--- xterm-363/main.c 2020-10-12 11:37:02.000000000 -0700
+++ xterm-363/main.c 2020-12-30 14:15:08.740214900 -0800
@@ -103,6 +103,7 @@
#include <X11/Xaw3d/Form.h>
#elif defined(HAVE_LIB_XAW3DXFT)
#include <X11/Xaw3dxft/Form.h>
+#include <X11/Xaw3dxft/Xaw3dXft.h>
#elif defined(HAVE_LIB_NEXTAW)
#include <X11/neXtaw/Form.h>
#elif defined(HAVE_LIB_XAWPLUS)
@@ -2207,6 +2208,9 @@
char *my_class = x_strdup(DEFCLASS);
unsigned line_speed = VAL_LINE_SPEED;
Window winToEmbedInto = None;
+#if defined(HAVE_LIB_XAW3DXFT)
+ Xaw3dXftData *xaw3dxft_data;
+#endif
ProgramName = argv[0];
@@ -2326,6 +2330,12 @@
XtSetLanguageProc(NULL, NULL, NULL);
#endif
+ /* enable Xft support in Xaw3DXft */
+#if defined(HAVE_LIB_XAW3DXFT)
+ GET_XAW3DXFT_DATA(xaw3dxft_data);
+ xaw3dxft_data->encoding = -1;
+#endif
+
#ifdef TERMIO_STRUCT /* { */
/* Initialization is done here rather than above in order
* to prevent any assumptions about the order of the contents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment