mkfontscale dumps core on .pcf, .pcf.gz or .bdf files:
(B
(B    mfabian@magellan:/tmp/ttt$ ls
(B    10x20.pcf.gz  12x24rk.bdf  core  fonts.scale
(B    mfabian@magellan:/tmp/ttt$ mkfontscale
(B    $B%;%0%a%s%F!<%7%g%s0cH?$G$9(B (core dumped)
(B    mfabian@magellan:/tmp/ttt$ strace -eopen mkfontscale
(B    open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
(B    open("/etc/ld.so.cache", O_RDONLY)      = 3
(B    open("/usr/lib64/libfreetype.so.6", O_RDONLY) = 3
(B    open("/lib64/libm.so.6", O_RDONLY)      = 3
(B    open("/lib64/libz.so.1", O_RDONLY)      = 3
(B    open("/lib64/libc.so.6", O_RDONLY)      = 3
(B    open("./", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
(B    open("./fonts.scale", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
(B    open("./.", O_RDONLY)                   = 5
(B    open("./..", O_RDONLY)                  = 5
(B    open("./core", O_RDONLY)                = 5
(B    open("./12x24rk.bdf", O_RDONLY)         = 5
(B    open("/etc/mtab", O_RDONLY)             = 5
(B    open("/proc/meminfo", O_RDONLY)         = 5
(B    --- SIGSEGV (Segmentation fault) ---
(B    +++ killed by SIGSEGV +++
(B    mfabian@magellan:/tmp/ttt$ mv 12x24rk.bdf ..
(B    mfabian@magellan:/tmp/ttt$ strace -eopen mkfontscale
(B    open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
(B    open("/etc/ld.so.cache", O_RDONLY)      = 3
(B    open("/usr/lib64/libfreetype.so.6", O_RDONLY) = 3
(B    open("/lib64/libm.so.6", O_RDONLY)      = 3
(B    open("/lib64/libz.so.1", O_RDONLY)      = 3
(B    open("/lib64/libc.so.6", O_RDONLY)      = 3
(B    open("./", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3
(B    open("./fonts.scale", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
(B    open("./.", O_RDONLY)                   = 5
(B    open("./..", O_RDONLY)                  = 5
(B    open("./core", O_RDONLY)                = 5
(B    open("./10x20.pcf.gz", O_RDONLY)        = 5
(B    --- SIGSEGV (Segmentation fault) ---
(B    +++ killed by SIGSEGV +++
(B    mfabian@magellan:/tmp/ttt$
(B
(BProbably it makes no sense for mkfontscale to bother with .pcf,
(B.pcf.gz, and .bdf files. mkfontdir already handles these files.
(B
(BMaybe mkfontscale should just ignore them?
(B
(BHere is a tentative patch which fixes the problem for me:
(B
(B--- mkfontscale.c.orig  2003-01-21 21:01:53.000000000 +0100
(B+++ mkfontscale.c       2003-01-21 20:58:50.000000000 +0100
(B@@ -346,6 +346,11 @@
(B         if(entry == NULL)
(B             break;
(B         filename = strcat_reliable(dirname, entry->d_name);
(B+       /* bitmap fonts in .pcf or .bdf format should not be included in fonts.scale */
(B+       if(strstr(filename, ".pcf") ||
(B+          strstr(filename, ".pcf.gz") ||
(B+          strstr(filename, ".bdf"))
(B+           continue;
(B         ftrc = FT_New_Face(ft_library, filename, 0, &face);
(B         if(ftrc)
(B             continue;
(B
(B-- 
(BMike Fabian   <[EMAIL PROTECTED]>   http://www.suse.de/~mfabian
$B?gL2ITB-$O$$$$;E;v$NE($@!#(B
(B_______________________________________________
(BFonts mailing list
([EMAIL PROTECTED]
(Bhttp://XFree86.Org/mailman/listinfo/fonts


Reply via email to