On Sun, 4 Jan 2004, Ross Boylan wrote:

> With help from the tips here, I've managed to build a debug version of
> xterm.
>
> This shows the font being used is
> -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso10646-1

That's probably from an X resource setting that looks like

*VT100*font5: -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso10646-1

The second "*" is redundant and will cause current xterm to produce a
different font than older code.  See the "XTerm" app-defaults file,
where it lists the ".utf8fonts" lines.

> I verified that starting xterm with this as -fn produces the same
> result as plain xterm (namely spaced out fonts).
>
> It appears this is set in a call to XtVaCreateManagedWidget
>       term = (XtermWidget) XtVaCreateManagedWidget(
>               "vt100", xtermWidgetClass, form_top,
>
> which is outside of xterm (i.e., not in code I can debug easily).  The
> startup trace shows -fn set to (standard).

Not exactly.  This calls functions that are declared for each widget.
For xterm, the interesting ones are in charproc.c, e.g., VTInitialize().
When the debug-trace is compiled in, most of the resource initialization
is logged in "Trace-parent.out".

> Also, a header file defines DEFONT as "fixed", but this is never used
> in the code, as far as I can tell (with grep).   Again, 4.2.1 source.

(4.2.1 is a little old, and current xterm source should build against that
in any case).

% Command: fgrep -n DEFFONT *
> fgrep -n DEFFONT *
charproc.c:456:    Sres(XtNfont, XtCFont, misc.default_font.f_n, DEFFONT),
fontutils.c:971:        Sres(XtNfont, XtCFont, default_font.f_n, DEFFONT),
main.h:35:#define DEFFONT                       "fixed"

> Does this mean that xterm is picking up X's general default font?  If
> so, where is that set?

"fixed" is an alias, e.g., one of the symbols in a "fonts.alias" file
under /usr/X11R6/lib/X11/fonts/... (see mkfontdir).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to