[Bug 1314] New: - Wine always downloads truetype fonts into its ps files when printing

wine-bugs at winehq.com wine-bugs at winehq.com
Sat Mar 8 16:07:59 CST 2003


http://bugs.winehq.com/show_bug.cgi?id=1314

           Summary: Wine always downloads truetype fonts into its ps files
                    when printing
           Product: Wine
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: wine-gdi
        AssignedTo: wine-bugs at winehq.com
        ReportedBy: wine at alk.org.lu


In wine-20030302 shipped by SuSE, if you have a truetype font directory defined such 
as the following: 
 
[FontDirs] 
"dir1" = "/home/aknaff/winefonts/core/ttf" 
 
then all fonts defined there in will be downloaded into the generated postscript file, 
even if the printer natively understands them (as defined in  the ppd file). 
 
I.e. if I have an arial truetype font, this font is downloaded to the printer, even though I 
have the following in my .ppd file: 
 
*Font ArialMT: 
*Font Arial-BoldMT: 
*Font Arial-BoldItalicMT: 
*Font Arial-ItalicMT: 
 
and even though I have the relevant .afm files in my [afmdirs]. 
 
The only way how I could force wine to use the printer's builtin Arial font was to define 
a substitution table where I substituted it with itself: 
 
[System\\CurrentControlSet\\Control\\Print\\Printers\\file\\PrinterDriverData\\FontSubTable] 
1047119381 
"Courier New"="Courier New" 
"Arial"="Arial" 
"Times New Roman"="Times New Roman" 
"Webdings"="Webdings" 
"Tahoma"="Tahoma" 
... 
 
[Btw, the above FontSubTable worked for Courier New, Arial, Times New Roman, and 
Tahoma, but still not for Webdings. But that's probably a different problem]. 
 
After perusing the source code, I found the following in 
wine-20030219/dlls/wineps/font.c near the end of function PSDRV_SelectFont : 
 
    if(physDev->dc->gdiFont && !subst) { 
        if(PSDRV_SelectDownloadFont(physDev)) 
	    return 0; /* use gdi font */ 
    } 
 
    PSDRV_SelectBuiltinFont(physDev, hfont, &lf, FaceName); 
    return (HFONT)1; /* use device font */ 
 
I.e. if there is a gdiFont defined for current font (I assume, this means if a display font 
has been loaded), and if the font is not the result of a substitution, then we download it 
into the printer. Otherwise we try to use a builtin font. 
 
Shouldn't that be the other way round: first try to use a builtin font, and only if that is not 
possible (because no such font defined in generic.ppd or missing .afm file) download it.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=1314>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.



More information about the wine-bugs mailing list