(in the original report)
> Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set

On Fri, Oct 22, 2021 at 02:34:44AM +0200, Vincent Lefevre wrote:
> And if I give an explicit UTF-8 font such as
>   Xpdf*font: -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso10646-1
> I get complete garbage (lots of white squares).

After some investigation, this appears to be the result of a fault in
Motif that makes it fail to understand your locale settings.
It looks like _XmStringGetCurrentCharset detects the charset in use by
looking at LANG, and doesn't know about LC_CTYPE. (I'm not sure why it
doesn't use nl_langinfo(CODESET).) So this probably needs filing
separately against the motif package...

> I'm also wondering how Xft fonts can be used. Syntax like
> xft:Bitstream:size=9 (as used by fvwm) doesn't work.

I've just made some changes to the xpdf man page to document this
better (and I've also made the -font argument map to the font resource,
rather than fontList, since the latter doesn't always override the
default styling in Motif).

The documentation for -font now reads:

   -font font

   Override the fonts used for the user interface. This uses a single X
   core font for all user interface elements, which is not ideal; see the
   USER INTERFACE FONTS section below for better approaches. (-fn is
   equivalent.) [X resource: xpdf*font]

And there's a new section:

   USER INTERFACE FONTS

   In order to support international text in user interface elements, xpdf
   uses the support for UTF-8 and Xft fonts that was introduced in
   OpenMotif 2.3.

   The user interface makes use of four fonts which are specified using
   Motif Render Tables: default for most text, mono for text in a
   monospaced font, and helpHuge and helpBig for headings in the About
   dialog. The fonts used can be customised using X resources. By default,
   they are configured as follows:

   Xpdf*renderTable.default.fontType: FONT_IS_XFT
   Xpdf*renderTable.default.fontName: Sans-Serif
   Xpdf*renderTable.default.fontSize: 12
   Xpdf*renderTable.default.fontEncoding: iso10646-1
   Xpdf*renderTable.helpHuge.fontType: FONT_IS_XFT
   Xpdf*renderTable.helpHuge.fontName: Serif
   Xpdf*renderTable.helpHuge.fontStyle: bold
   Xpdf*renderTable.helpHuge.fontSize: 20
   Xpdf*renderTable.helpHuge.fontEncoding: iso10646-1
   Xpdf*renderTable.helpBig.fontType: FONT_IS_XFT
   Xpdf*renderTable.helpBig.fontName: Serif
   Xpdf*renderTable.helpBig.fontSize: 16
   Xpdf*renderTable.helpBig.fontEncoding: iso10646-1
   Xpdf*renderTable.mono.fontType: FONT_IS_XFT
   Xpdf*renderTable.mono.fontName: Monospace
   Xpdf*renderTable.mono.fontSize: 12
   Xpdf*renderTable.mono.fontEncoding: iso10646-1

   If you prefer to use X core fonts, as in earlier versions of xpdf, you
   can specify these using conventional resources, provided that you use
   fonts with the "iso10646-1" Unicode charset:

   Xpdf*font: -*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso10646-1
   Xpdf*XmTextField.font: -*-courier-medium-r-normal-*-12-*-*-*-*-*-iso10646-1

If you can think of any improvements to this then please let me know!

Thanks,

-- 
Adam Sampson <a...@offog.org>                         <http://offog.org/>

Reply via email to