On Sat, Feb 03, 2001 at 04:18:45PM +0600, Ian Pilcher wrote:
I just spent some time poking around in the Registry of my Windows 2000 system. Neither "TTFontSubTable" or "FontSubTable" appears anywhere. (I have printers installed that use both the Adobe and Microsoft Post- Script drivers.)
Try changing an entry in the font sub table. The driver doesn't write anything until you move anyway from the default.
Another point of interest -- none of the printer properties dialogs seem to allow me to configure the font substitution, even though I have "TrueType Font: Substitute with Device Font" set in the Advanced Options of the Apple LaserWriter 12/640 PS driver.
My LaserJet 4/4M driver allows you to edit the table in the Device Settings tab of the Property dailog got by going to Control Panel -> Printers, selecting the printer and then doing Printer->Properties.
We don't need to worry about compatibility with the native drivers to this extent (this data is private to the driver), I was just using this as an example to how a native driver does save its data.
So is "FontSubTable" what we want to use? It should be easy enough for me to have the driver use GetPrinterData and set up a simple array when it is initialized. (Although it does seem a little weird to have the driver calling OpenPrinter; is this OK?)
It doesn't matter: TTFontSubTable is what the native M$ driver uses, but we can use anything you like. Calling OpenPrinter is fine within the driver - it only really retrieves a printer handle.
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.
Two points:
How can a user get this information into the Registry until the GUI control is written? (I hope you weren't thinking that this is some- think I'm capable of doing. Me stupid procedural guy; OO GUI stuff make head feel oogey!)
Just because people use Wine to run Windows applications, doesn't mean that they've bought into the "everything should be GUI" philosophy; some of us actually *like* ASCII configuration files.
The Wine registry files are ascii, and adding stuff to the registry can be done via the regapi program anyway.
I actually see a manual font configuration as a *very* small step in this direction. At least it will let Wine control it's view of what fonts are available, rather than trying to make intelligent guesses based on the X font list and the PostScript driver.
It does assume a certain intelligence on the user's part; mapping the core Windows fonts to X fonts that aren't installed on the system would be "bad", but it shouldn't be too hard to supply a reasonable default configuration.
I anticipate that most people will just be happy using TT/Type1/.fon fonts all served by FreeType and will not bother using XLFD fonts at all. This makes font configuration quite easy, we just tell the FreeType font driver which font files we want it to serve and that's it. The psdrv may still want to substitute builtin type1 fonts, but that seems to me to be psdrv's role and thus its configuration is unique to that; this becomes more obvious when you think that the user may install 2 instances of psdrv that print to different printers which may have different fontsets installed, therefore font substitution would be on a printer by printer basis.
Huw.