Bug 102251 - postscript fonts do not work under teTeX 3.0
Summary: postscript fonts do not work under teTeX 3.0
Status: CLOSED FIXED
Alias: None
Product: kdvi
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan Kebekus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-23 10:57 UTC by cu200
Modified: 2005-07-02 21:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cu200 2005-03-23 10:57:39 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources

Kdvi uses kpsewhich to locate fonts. Under teTeX-3.0 (possibly
other versions), the command

  kpsewhich "--format=config dvips"  ps2pk.map

does not produce the path to the file ps2pk.map. Somehow the
option "--format config dvips" makes kpsewhich failing to find
the right path. Changing the option to "--format=map" in 
fontMap.cpp file in the kdvi-tree corrects the problem. Kdvi
now finds the fonts. Unfortunately, kdvi now often crashes.
This has probably to do with finding the fonts. No idea.
Comment 1 Jie Gao 2005-03-26 03:40:31 UTC
I am using FreeBSD 5.3-STABLE with KDE-3.4 compiled from ports. The same problem with teTeX-3.0. In teTex-3.0 ps2pk.map is moved out of dvips's config directory, so --format="dvips config" should not apply in this case. 

The above solution is the same as what I did to solve the problem:

--- kdvi/fontMap.cpp.orig       Fri Mar 25 19:25:43 2005
+++ kdvi/fontMap.cpp    Fri Mar 25 19:26:00 2005
@@ -26,7 +26,7 @@
   // has, like kdvi (and unlike dvips), no built-in fonts.
   
   KProcIO proc;
-  proc << "kpsewhich" << "--format=dvips config" << "ps2pk.map";
+  proc << "kpsewhich" << "--format=map" << "ps2pk.map";
   if (proc.start(KProcess::Block) == false) {
     kdError(4700) << "fontMap::fontMap(): kpsewhich could not be started." << endl;
     return;

But unlike the original reporter, I did not observe any unstabilities when this was done.
Comment 2 Michael Nottebrock 2005-03-26 11:13:49 UTC
Actually, the line of the original reporter *does work*, but since it doesn't match what's in the source it's probably a typo. :-)

[lofi@kiste]:1:~ > kpsewhich "--format=config dvips" ps2pk.map
/usr/local/share/texmf-var/fonts/map/dvips/updmap/ps2pk.map

[lofi@kiste]:0:~ > kpsewhich "--format=dvips config" ps2pk.map
[lofi@kiste]:1:~ >

[lofi@kiste]:1:~ > kpsewhich "--format=map" ps2pk.map
/usr/local/share/texmf-var/fonts/map/dvips/updmap/ps2pk.map
Comment 3 Jie Gao 2005-03-26 20:14:05 UTC
Yes, really. In the source it is "--format=dvips config".

Actuall "--format=config dvips" works but I could not find it anywhere in the kpsewhich documentation. 
Comment 4 cu200 2005-03-27 17:00:11 UTC
Yes, my original report contained a typo. Correct is that

  kpsewhich "--format=dvips config" ps2pk.map

does not work (i.e. kdvi does not find ps-fonts). Changing
this line to

  kpsewhich "--format=map" ps2pk.map

solves this problem, but now kdvi crashes on certain 
dvi-files (unfortunately quite a lot). 
Comment 5 Stefan Kebekus 2005-03-30 09:30:39 UTC
Hello,

I can reproduce the error here on my machine. However, KDVI still displays DVI 
files correctly, using PK fonts rather than PS fonts. Can you confirm that 
this also happens on your machine, or do you have a DVI file that cannot be 
displayed with PK fonts?

Best,

Stefan.
Comment 6 Stefan Kebekus 2005-03-30 09:30:39 UTC
Dear Christian Urban,

I tried to change the source file fontMap.cpp as suggested in a previous mail 
by Jie Gao


-- kdvi/fontMap.cpp.orig       Fri Mar 25 19:25:43 2005
+++ kdvi/fontMap.cpp    Fri Mar 25 19:26:00 2005
 @ -26,7 +26,7  @
   // has, like kdvi (and unlike dvips), no built-in fonts.
   
   KProcIO proc;
-  proc << "kpsewhich" << "--format=dvips config" << "ps2pk.map";
+  proc << "kpsewhich" << "--format=map" << "ps2pk.map";
   if (proc.start(KProcess::Block) == false) {
     kdError(4700) << "fontMap::fontMap(): kpsewhich could not be started." << 
endl;
     return;


I could, however, not experience any instability. Do you have a reliable way 
to reproduce a crash? Could you send me a DVI file that triggers an error?

Best,

Stefan.
Comment 7 Stefan Kebekus 2005-03-30 09:30:43 UTC
Thank you very much for the help. I have fixed the problem now ... although I 
couldn't just change the line 

  kpsewhich "--format=dvips config" ps2pk.map

into

  kpsewhich "--format=map" ps2pk.map

for then teTeX version < 3.0 does not work any more. Currently, I see no other 
solution than to try "--format=map" first, and then, if that fails, 
"--format=dvips config". 

The patch is uploaded to the KDE CVS server. It will be contained in the 
upcoming KDE 3.4.1 release.

Best,

Stefan Kebekus
Comment 8 Stefan Kebekus 2005-07-02 21:42:30 UTC
*** Bug has been marked as fixed ***.