[Bug 1118557] New: xdvi: cannot display dvi ("Missing charsets in String to FontSet conversion" / "Unable to load any usable fontset")
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 Bug ID: 1118557 Summary: xdvi: cannot display dvi ("Missing charsets in String to FontSet conversion" / "Unable to load any usable fontset") Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.0 Hardware: x86-64 OS: Other Status: NEW Severity: Major Priority: P5 - None Component: X11 Applications Assignee: bnc-team-screening@forge.provo.novell.com Reporter: Ulrich.Windl@rz.uni-regensburg.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Running LaTeX in GNU Emacs, I could create a DVI file, but I could not display it, because xdvi aborts. The system was upgraded from Leap 42.3, where those programs worked without a problem. Messages from xdvi are: Warning: Missing charsets in String to FontSet conversion Warning: Unable to load any usable fontset Error: Aborting: no fontset found I have 2145 texlive packages installed, I guess that should be enough to display a DVI file. When I use pdflatex on the same file, I get a PDF file that displays without problems, and the document contains CM (Computer Modern) fonts only. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c3 --- Comment #3 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> --- (In reply to Dr. Werner Fink from comment #1)
No CM but
grep fontset -i /usr/share/X11/app-defaults/XDvi *tipShell.fontSet: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
I see the same output here, but xdvi still complains: ~> xdvi Warning: Missing charsets in String to FontSet conversion Warning: Unable to load any usable fontset Error: Aborting: no fontset found What are the roles of ~/.cache/texmf/fonts and ~/texmf/fonts? I only have .cache/texmf/fonts/pk/ljfour/public/cm/cm*pk here, but xdvi seems to look for "vf" instead of "pk"... (In reply to Stefan Brüns from comment #2)
*only* mkfontdir and the xorg-x11-fonts-core are required. As soon as you install both packages, everything else is configured automatically.
You may need to relogin for the changes to take effect.
This is a packaging bug in texlive-xdvi.
I have both: mkfontdir-1.0.7-lp150.1.6.x86_64 (/usr/bin/mkfontdir) and xorg-x11-fonts-core-7.6-lp150.2.1.noarch installed, but still no luck. I tested a very old (1996) DVI file that definitely worked on previous versions, as well as the version created with Leap 15.0: Both bring up the same error messages. When using "xdvi -notype1fonts" I see some fonts being created, but still xdvi ends like this: Font metrics written on cmr10.tfm. Output written on cmr10.657gf (128 characters, 26100 bytes). Transcript written on cmr10.log. mktexpk: /home/user/.cache/texmf/fonts/pk/ljfour/public/cm/cmr10.657pk: successfully generated. Warning: Missing charsets in String to FontSet conversion Warning: Unable to load any usable fontset Error: Aborting: no fontset found -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c4 --- Comment #4 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> --- When running "xfontsel", I see the very same error messages: ~> xfontsel Warning: Missing charsets in String to FontSet conversion Warning: Unable to load any usable fontset However it's not that I have no fonts installed: ~> fc-list | wc -l 3308 ~> fc-list | grep -i helveti | wc -l 110 ~> fc-list | grep -i helvetica.*bold | wc -l 50 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c5 --- Comment #5 from Stefan Brüns <stefan.bruens@rwth-aachen.de> --- (In reply to Ulrich Windl from comment #4)
When running "xfontsel", I see the very same error messages: ~> xfontsel Warning: Missing charsets in String to FontSet conversion Warning: Unable to load any usable fontset
However it's not that I have no fonts installed: ~> fc-list | wc -l 3308 ~> fc-list | grep -i helveti | wc -l 110 ~> fc-list | grep -i helvetica.*bold | wc -l 50
You are confusing fontconfig (client side) and the legacy X11 Core/serverside fonts. xfontsel uses the legacy X11 Core fonts. To see which fonts are available via the Core fonts mechanism, do $> grep "helvetica-medium-r-.*-12-" /usr/share/fonts/*/fonts.dir -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c6 --- Comment #6 from Stefan Brüns <stefan.bruens@rwth-aachen.de> --- (In reply to Ulrich Windl from comment #3)
(In reply to Dr. Werner Fink from comment #1)
No CM but
grep fontset -i /usr/share/X11/app-defaults/XDvi *tipShell.fontSet: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
I see the same output here, but xdvi still complains: ~> xdvi Warning: Missing charsets in String to FontSet conversion Warning: Unable to load any usable fontset Error: Aborting: no fontset found
What are the roles of ~/.cache/texmf/fonts and ~/texmf/fonts? I only have .cache/texmf/fonts/pk/ljfour/public/cm/cm*pk here, but xdvi seems to look for "vf" instead of "pk"...
This is not relevant here ...
(In reply to Stefan Brüns from comment #2)
*only* mkfontdir and the xorg-x11-fonts-core are required. As soon as you install both packages, everything else is configured automatically.
You may need to relogin for the changes to take effect.
This is a packaging bug in texlive-xdvi.
I have both: mkfontdir-1.0.7-lp150.1.6.x86_64 (/usr/bin/mkfontdir) and xorg-x11-fonts-core-7.6-lp150.2.1.noarch installed, but still no luck. I tested a very old (1996) DVI file that definitely worked on previous versions, as well as the version created with Leap 15.0: Both bring up the same error messages.
When using "xdvi -notype1fonts" I see some fonts being created, but still xdvi ends like this:
Font metrics written on cmr10.tfm. Output written on cmr10.657gf (128 characters, 26100 bytes). Transcript written on cmr10.log. mktexpk: /home/user/.cache/texmf/fonts/pk/ljfour/public/cm/cmr10.657pk: successfully generated. Warning: Missing charsets in String to FontSet conversion Warning: Unable to load any usable fontset Error: Aborting: no fontset found
You are confusing fonts used by the application with fonts used by the document. The missing font is required by the xdvi to show menus, dialogs, ..., while the "-notype1fonts" options affects the fonts used to show the document. You can convert the DVI file to e.g. PDF and open it in any PDF viewer. Also, Evince AFAIK has a plugin to view DVI files directly. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c7 --- Comment #7 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> --- (In reply to Stefan Brüns from comment #5)
You are confusing fontconfig (client side) and the legacy X11 Core/serverside fonts. xfontsel uses the legacy X11 Core fonts.
To see which fonts are available via the Core fonts mechanism, do $> grep "helvetica-medium-r-.*-12-" /usr/share/fonts/*/fonts.dir
(In reply to Stefan Brüns from comment #6)
This is not relevant here ...
I just wanted to point out that despite of hundreds of installed fonts xdvi (and other tools) keep complaining that there are no fonts. And I'm clueless regarding the reason (In Leap 42.3 everything worked; I just upgraded). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c8 --- Comment #8 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> --- (In reply to Stefan Brüns from comment #5)
To see which fonts are available via the Core fonts mechanism, do $> grep "helvetica-medium-r-.*-12-" /usr/share/fonts/*/fonts.dir
Still, the result is confusing: ~> grep "helvetica-medium-r-.*-12-" /usr/share/fonts/*/fonts.dir /usr/share/fonts/75dpi/fonts.dir:helvR12-ISO8859-1.pcf.gz -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1 /usr/share/fonts/75dpi/fonts.dir:helvR12-ISO8859-10.pcf.gz -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-10 /usr/share/fonts/75dpi/fonts.dir:helvR12-ISO8859-13.pcf.gz -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-13 /usr/share/fonts/75dpi/fonts.dir:helvR12-ISO8859-14.pcf.gz -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-14 /usr/share/fonts/75dpi/fonts.dir:helvR12-ISO8859-15.pcf.gz -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-15 /usr/share/fonts/75dpi/fonts.dir:helvR12-ISO8859-2.pcf.gz -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-2 /usr/share/fonts/75dpi/fonts.dir:helvR12-ISO8859-3.pcf.gz -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-3 /usr/share/fonts/75dpi/fonts.dir:helvR12-ISO8859-4.pcf.gz -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-4 /usr/share/fonts/75dpi/fonts.dir:helvR12-ISO8859-9.pcf.gz -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-9 /usr/share/fonts/75dpi/fonts.dir:helvR12.pcf.gz -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso10646-1 Could the font encoding be part of the problem? ~> locale LANG=de_DE.UTF-8 LC_CTYPE=de_DE.UTF-8 LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES="de_DE.UTF-8" LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL= -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c9 --- Comment #9 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> --- Some more mysteries: * I can convert a DVI file to PNG using dvipng without a problem. * Listing the fonts (xdvi -l) of one problematic files shows: xdvi: cmti10 at 657 dpi xdvi: cmbx10 at 657 dpi xdvi: cmbx12 at 720 dpi xdvi: cmr12 at 720 dpi xdvi: cmr8 at 600 dpi xdvi: cmr12 at 600 dpi xdvi: cmr10 at 657 dpi xdvi: cmr7 at 600 dpi Warning: Missing charsets in String to FontSet conversion Warning: Unable to load any usable fontset Error: Aborting: no fontset found However, the display resolution reported by xdpyinfo is 96 DPI. Could it be that xdvi mis-calculates the font resolution? dvitype reports this: This is DVItype, Version 3.6 (TeX Live 2017/TeX Live for SUSE Linux) Options selected: Starting page = * Maximum number of pages = 1000000 Output level = 4 (the works) Resolution = 300.00000000 pixels per inch numerator/denominator=25400000/473628672 magnification=1000; 0.00006334 pixels per DVI unit ' TeX output 2018.12.05:2252' Postamble starts at byte 2911. maxv=48071446, maxh=30767216, maxstackdepth=9, totalpages=1 Font 20: cmti10 scaled 1095---loaded at size 717619 DVI units (this font is magnified 109%) Font 19: cmbx10 scaled 1095---loaded at size 717619 DVI units (this font is magnified 109%) Font 18: cmbx12 scaled 1200---loaded at size 943718 DVI units (this font is magnified 120%) Font 17: cmr12 scaled 1200---loaded at size 943718 DVI units (this font is magnified 120%) Font 16: cmr8---loaded at size 524288 DVI units Font 15: cmr12---loaded at size 786432 DVI units Font 14: cmr10 scaled 1095---loaded at size 717619 DVI units (this font is magnified 109%) Font 6: cmr7---loaded at size 458752 DVI units 42: beginning of page 1 [...] dvipdf can convert the DVI to PDF also without any complaint. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c10 --- Comment #10 from Stefan Brüns <stefan.bruens@rwth-aachen.de> --- (In reply to Ulrich Windl from comment #9)
Some more mysteries: * I can convert a DVI file to PNG using dvipng without a problem.
Of course. dvipng does not use X11 Core fonts.
* Listing the fonts (xdvi -l) of one problematic files shows: xdvi: cmti10 at 657 dpi xdvi: cmbx10 at 657 dpi xdvi: cmbx12 at 720 dpi xdvi: cmr12 at 720 dpi xdvi: cmr8 at 600 dpi xdvi: cmr12 at 600 dpi xdvi: cmr10 at 657 dpi xdvi: cmr7 at 600 dpi Warning: Missing charsets in String to FontSet conversion Warning: Unable to load any usable fontset Error: Aborting: no fontset found
Let me repeat: ** TEX FONTS ARE IRRELEVANT HERE ** xdvi is missing an X11 Core font. Create a DVI file with an empty page, you will get the same error. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c11 --- Comment #11 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> --- (In reply to Stefan Brüns from comment #10)
Let me repeat: ** TEX FONTS ARE IRRELEVANT HERE **
xdvi is missing an X11 Core font. Create a DVI file with an empty page, you will get the same error.
Excuse me if I thought Tex is using TeX fonts, just as xdvi does. I don't understand: About every program except xdvi (and a few related, maybe) have not problems finding or displaying fonts, and my system passes all the checks I performed so far. Still xdvi does not work. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c12 --- Comment #12 from Stefan Brüns <stefan.bruens@rwth-aachen.de> --- (Traditional) TeX uses its own (vector) fonts, which are used to generate: - metrics (tfm, TeX Font Metrics) - bitmap renderings at print/display resolution (*.pk) For the generation of DVI files, only metrics are relevant - it contains font names and glyph positions, but no information how to render these fonts. A dvi converter (dvipng, dvitopdf, xdvi) uses the names and positions to create a graphical representation. Later TeX gained the capability to use the standard postscript fonts (Helvetica, Courier, Times, ...). It still uses its own metrics in TFM format, but for the rendering (display, printing) the Type1 vectors fonts are used. For backwards compatibility, the Postscript fonts are also available in PK format. xdvi uses either the PK or Type1 font to render *the document contents*. Thats what you are seeing when starting xdvi with/out -notype1fonts. xdvi also uses fonts to display menus and the like. These are *not* rendered using TeX fonts, but a completely different mechanism, X11 Core fonts. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c14 --- Comment #14 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> --- Tried with a newly created user (fresh user configuration): Same result. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c15 --- Comment #15 from Stefan Brüns <stefan.bruens@rwth-aachen.de> --- Brokenness on all levels ... The "Unable to load any usable fontset" is originating from libXt: https://github.com/freedesktop/xorg-libXt/blob/0659374e8c1a39433f074226a65f2... while "Error: Aborting: no fontset found" originates from libXaw. Unfortunately, both libs fail to report which font spec they are trying to match. libXt tries to fallback to *any* font with PtSize 120, Slant Regular, or anything else (comma separated list). So when this error occurs, there is something *seriously* broken, i.e. not even the "*" pattern matches. The "Warning: Missing charsets in String to FontSet conversion" can mostly be ignored, when using any UTF8 locale it tries to find fonts covering almost every charset completely, even DroidSans + DroidSansFallbackFull combined is not sufficient for this. Also, there are several bugs in the X11 encodings handling: mkfontscale/mkfontdir does not work as do documented/expected. "mkfontscale -b -s -l is equivalent to mkfontdir." "-l Write fonts.dir files suitable for implementations that cannot reencode legacy fonts (BDF and PCF). By default, it is assumed that the implementation can reencode Unicode-encoded legacy fonts." The actual outcome is exactly opposite - "-l" *disables* the creation of the "legacy" encodings. This is a bug known for 3 years, see https://gitlab.freedesktop.org/xorg/app/mkfontscale/issues/3 . Although the X server is capable of reencoding iso10646-1 encoded PCF fonts on the fly, it fails to list these fonts as compatible for e.g. 8859-1, which is used for the C locale. This happens when mkfontdir is called without any further parameters. mkfontscale ignores the "-e" parameters for large parts, i.e. it is only used for generating the "encodings.dir", but not for generating the "fonts.dir"/"fonts.scale". -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c16 --- Comment #16 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> --- Funny finding: Using "LANG=en_EN.UTF-8 xdvi" instead of default locale "de_DE.UTF-8" works! Before that I tried LANG=C and LANG=de_DE.ISO8859-1, both without success. I seems that something with the German locale data is broken, or the processing of German locale. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c18 --- Comment #18 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> --- (In reply to Dr. Werner Fink from comment #17) [...]
the commands are for tcsh, but even with bash
unset ${!LC_*} LANG=de_DE.UTF-8 xdvi
it works. Maybe I should note that I've have always an encoding.dir as well as fonts.dir and fonts.scale below *all* subdirectories /usr/share/fonts/ as well as fonts.alias for the subdirectories of the x11 fonts packages.
It's really crazy: Using unset ${!LC_*} LANG=de_DE.UFT-8 xdvi file.dvi works despite of the message "Warning: locale not supported by C library, locale unchanged", too, but plain "xdvi file.dvi" does not (usual messages). And to top all that: $LANG is "de_DE.UTF-8"! Doing more tests, I found that "LC_CTYPE=de_DE.UTF-8 xdvi ..." triggers the problem when all other language variables are unset. If I use "LC_CTYPE=de_DE.UTF-8 xdvi ..." it does NOT work, but when I use (illegal?) "LC_CTYPE=xx_XX.UTF-8 xdvi ..." it works!!! What works too is "LC_CTYPE=de_DE.iso8859-1 xdvi ..." Sorry, I cannot make any sense from all this! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1118557 http://bugzilla.opensuse.org/show_bug.cgi?id=1118557#c19 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #19 from Dr. Werner Fink <werner@suse.com> --- Leap 15.0 is gone -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com