On 2026-01-15 03:58:52 +0100, Vincent Lefevre wrote:
> I've added an abort() after the warning in Fontconfig, and I confirm
> that this is obtained via Motif. I've attached the backtrace.
>
> This happens via the ValidateAndLoadFont call:
>
> [...]
> #6 0x00007f172b316b89 in FcObjectFromName (name=name@entry=0x7f172b051b24
> "encoding") at ./src/fcname.c:110
> No locals.
> #7 0x00007f172b319888 in IA__FcPatternAddString (p=0x55bb07356dc0,
> object=object@entry=0x7f172b051b24 "encoding", s=0x55bb0731f41
> 0 "iso10646-1") at ./src/fcpat.c:825
> No locals.
> #8 0x00007f172afa4b23 in ValidateAndLoadFont
> (rend=rend@entry=0x55bb07356d50, display=<optimized out>,
> display@entry=0x55bb07308550) at ./lib/Xm/XmRenderT.c:2107
> [...]
>
> and this function is defined in "lib/Xm/XmRenderT.c", and if
> I understand corretly, this is "case XmFONT_IS_XFT:".
The code in ValidateAndLoadFont() is the following:
[...]
_XmRendPattern(rend) = FcPatternCreate();
if (_XmRendFontName(rend))
FcPatternAddString(_XmRendPattern(rend), FC_FAMILY,
(XftChar8 *)_XmRendFontName(rend));
if (_XmRendFontFoundry(rend))
FcPatternAddString(_XmRendPattern(rend), FC_FOUNDRY,
(XftChar8 *)_XmRendFontFoundry(rend));
if (_XmRendFontEncoding(rend))
FcPatternAddString(_XmRendPattern(rend), XFT_ENCODING,
(XftChar8 *)_XmRendFontEncoding(rend));
if (_XmRendFontStyle(rend))
FcPatternAddString(_XmRendPattern(rend), FC_STYLE,
(XftChar8 *)_XmRendFontStyle(rend));
if (_XmRendFontSize(rend))
FcPatternAddInteger(_XmRendPattern(rend), FC_SIZE,
_XmRendFontSize(rend));
if (_XmRendPixelSize(rend))
FcPatternAddInteger(_XmRendPattern(rend), FC_PIXEL_SIZE,
_XmRendPixelSize(rend));
if (_XmRendFontSlant(rend))
FcPatternAddInteger(_XmRendPattern(rend), FC_SLANT,
_XmRendFontSlant(rend));
if (_XmRendFontWeight(rend))
FcPatternAddInteger(_XmRendPattern(rend), FC_WEIGHT,
_XmRendFontWeight(rend));
if (_XmRendFontSpacing(rend))
FcPatternAddInteger(_XmRendPattern(rend), FC_SPACING,
_XmRendFontSpacing(rend));
p = XftFontMatch(display, 0, _XmRendPattern(rend), &res);
[...]
It is the FcPatternAddString() call with XFT_ENCODING that triggers
the warning on my machine.
Note that XftFontMatch() will internally call XftInit(), which will
call FcInit(), but this occurs after the above FcPatternAddString()
call.
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)