Huw D M Davies wrote:
Great! Well the Windows 2000 PS driver stores the font sub table under the value name "TTFontSubTable" in the printer driver's PrinterDriverData registry key. To do this we need to implement Get/SetPrinterData (if you give me a couple of days I'll do it). The data associated with TTFontSubTable is just a set of 2n \0 terminated strings the final one terminated by 2 \0 (i.e. REG_MULTISZ). The actual configuring should go on in the printer setup property sheet. Hmmm, fancy learning a little of the Win32 api?
I think I can probably handle reading the registry. (Although from what little I've seen of the Win32 API, even that could be a night- mare.)
I think we should also allow the Wine config file to override what's in the registry.
hdavies@codeweavers.com should work. Could you also send me the output of --debugmsg +psdrv. Note if you're using ghostscript to process the output then the fonts will look about 15% larger, that's because GS's fonts are rather bigger than Adobe's and you're probably using Adobe's AFMs. Other than that then I'm seeing Wine's Courier to be about another 15% larger than the output from Windows.
I think I may have overstated how large Courier is printing, at least in relation to other Type 1 fonts. I had forgotten that the TrueType fonts I have converted to Type 1 tend to print somewhat smaller than the Adobe/Ghostscript fonts. (I do see the problem on both my Ghost- script-driven printer at home and the PostScript printers at work.) Since people seem to use Arial and Courier a lot, the problem is emphasized; content that uses monospaced fonts also tends to suffer more when it is unexpectedly wrapped.
So I think its mixing the two that makes things look really odd. For my particular situation, mapping everything to the "TrueType" fonts is probably the way to go, so I'll be motivated to get the user-defined mapping working.
Which leads me to another, more dangerous, thought. It seems to me that life would be simpler for everyone if we could bring some consistency to the way that Wine's display and print subsystems work with fonts. What about a section in the configuration file that related Windows, X, and PostScript font names?
In the old style, I would have suggested something of the form:
Windows Font = X LFD, PostScript font name
This would seem to be relatively straightforward to implement, and it would bring a small measure of sanity to the area. (I currently have both 'MS Sans Serif' and 'Ms Sans Serif' fonts, because the X server and the PostScript driver don't agree on what the font should be called!)
On Thu, Feb 01, 2001 at 11:19:31PM +0600, Ian Pilcher wrote:
I think I can probably handle reading the registry. (Although from what little I've seen of the Win32 API, even that could be a night- mare.)
OK, I've just submitted G|SetPrinterData implementations to wine-patches - please use these instead of direct Reg apis. (it should make life easier anyway.
You basically want
HANDLE hprn; OpenPrinterA("Wine PostScript Driver", &hprn, NULL); SetPrinterDataA(hprn, "FontSubTable" /*or whatever*/, REG_MULTI_SZ, pData, size); ClosePrinter(hprn);
where pData is a list of \0 terminated strings that make up the table, finally terminated by a double \0.
Reading the data back is almost the same using GetPrinterDataA
I think we should also allow the Wine config file to override what's in the registry.
Not really convinced about this. I'd like to move all of the psdrv stuff out of the config file (which afterall is just a bit of the registry) into its correct place under HKLM\System\CurrentControlSet\Control\Printers\Print The configuration should all be done via a GUI control.
Which leads me to another, more dangerous, thought. It seems to me that life would be simpler for everyone if we could bring some consistency to the way that Wine's display and print subsystems work with fonts. What about a section in the configuration file that related Windows, X, and PostScript font names?
In the old style, I would have suggested something of the form:
Windows Font = X LFD, PostScript font name
This would seem to be relatively straightforward to implement, and it would bring a small measure of sanity to the area. (I currently have both 'MS Sans Serif' and 'Ms Sans Serif' fonts, because the X server and the PostScript driver don't agree on what the font should be called!)
This should all be a lot easier when I get a FreeType engine bolted on to gdi. Then psdrv,x11drv,ttydrv(?) will all have access to the same data and thus consistancy should not be a problem.
Huw.
Huw D M Davies wrote:
OK, I've just submitted G|SetPrinterData implementations to wine-patches - please use these instead of direct Reg apis. (it should make life easier anyway.
I cannot get this patch to apply. I've tried it with a CVS pull from earlier today and one from 1/29. With both, I get:
patching file include/winspool.h Hunk #1 FAILED at 957. 1 out of 1 hunk FAILED -- saving rejects to file include/winspool.h.rej patching file dlls/winspool/info.c Hunk #1 FAILED at 73. 1 out of 3 hunks FAILED -- saving rejects to file dlls/winspool/info.c.rej patching file dlls/winspool/winspool.drv.spec
Am I missing a prerequisite patch? (I did have to cut & paste this out of the HTML archive using Netscape, but it looks OK.)