IPrintOemUni::DownloadCharGlyph method enables a rendering plug-in for Unidrv to send a character glyph for a specified soft font to the printer.
HRESULT DownloadCharGlyph( PDEVOBJ pdevobj, PUNIFONTOBJ pUFObj, HGLYPH hGlyph, PDWORD pdwWidth, OUT DWORD *pdwResult );
Caller-supplied pointer to a DEVOBJ structure.
Caller-supplied pointer to a UNIFONTOBJ structure.
Caller-supplied glyph handle.
Caller-supplied pointer to receive the method-supplied width of the character.
Receives a method-supplied value representing the amount of printer memory, in bytes, required to store the character glyph. If the operation fails, the returned value should be zero.
The method must return one of the following values.
||The operation succeeded.|
||The operation failed|
||The method is not implemented.|
IPrintOemUni::DownloadCharGlyph method is used for supporting soft fonts on printers that do not accept PCL commands. Its purpose is to enable a rendering plug-in to send a character glyph to the printer.
If a rendering plug-in implements the
IPrintOemUni::DownloadCharGlyph method, Unidrv calls the method immediately after sending the command string specified by the CmdSetCharCode command entry, which is contained in the printer's GPD file. (GPD files are described in Microsoft Universal Printer Driver.) The method should do the following:
- Call the UNIFONTOBJ_GetInfo function to obtain the glyph image specified by hGlyph.
- Call IPrintOemDriverUni::DrvWriteSpoolBuf to send the glyph to the printer.
- Call the UNIFONTOBJ_GetInfo function again to obtain the glyph's width, then store the width in the address pointed to by pdwWidth.
- Return the amount of printer memory required to store the glyph by placing it in the location specified by pdwResult.
IPrintOemUni::DownloadCharGlyphmethod is optional. If a rendering plug-in implements this method, the plug-in's IPrintOemUni::GetImplementedMethod method must return S_OK when it receives "DownloadCharGlyph" as input.
If you implement the
IPrintOemUni::DownloadCharGlyph method, you must also implement the IPrintOemUni::DownloadFontHeader method.
For additional information see Customized Font Management.
|Header||prcomoem.h (include Prcomoem.h)|