IPrintOemUni::OutputCharStr method enables a rendering plug-in to control the printing of font glyphs.
HRESULT OutputCharStr( PDEVOBJ pdevobj, PUNIFONTOBJ pUFObj, DWORD dwType, DWORD dwCount, PVOID pGlyph );
Caller-supplied pointer to a DEVOBJ structure.
Caller-supplied pointer to a UNIFONTOBJ structure.
Caller-supplied value indicating the type of glyph specifier array pointed to by pGlyph. Valid values are as follows:
|TYPE_GLYPHHANDLE||The pGlyph array elements are glyph handles of type HGLYPH.|
|TYPE_GLYPHID||The pGlyph array elements are glyph identifiers of type DWORD.|
Caller-supplied value representing the number of glyph specifiers in the array pointed to by pGlyph.
Caller-supplied pointer to an array of glyph specifiers, where the array element type is indicated by dwType.
The method must return one of the following values.
||The operation succeeded.|
||The operation failed.|
||The method is not implemented.|
IPrintOemUni::OutputCharStr method is used for supporting printers that do not recognize the PCL, CAPSL, or PPDS-formatted character output commands supported by Unidrv. Its purpose is to allow a rendering plug-in to control the printing of a font's glyphs, and to provide glyph substitutions if necessary.
If a rendering plug-in implements the
IPrintOemUni::OutputCharStr method, Unidrv calls the method each time a string of characters is ready to be spooled.
The method receives an array of glyph specifiers. The value received for dwType indicates the identifier type.
If the specified font is a device font, the array contains glyph handles. The handles need to be translated to character codes or commands, and then sent to the print spooler to cause device glyphs to be printed.
If the specified font is a soft (TrueType) font, the array contains glyph identifiers. The identifiers represent previously downloaded glyphs that need to be printed.
If the specified font is a device font, the method must do the following:
- Allocate a GETINFO_GLYPHSTRING structure with dwTypeIn set to TYPE_GLYPHHANDLE and dwTypeOut set to TYPE_TRANSDATA.
- Call the UNIFONTOBJ_GetInfo function, passing the GETINFO_GLYPHSTRING structure as input, to obtain glyph translations as TRANSDATA structure contents.
- Call IPrintOemDriverUni::DrvWriteSpoolBuf to send TRANSDATA structure contents to the print spooler, in order to print the glyphs.
IPrintOemUni::OutputCharStr method is optional. If a rendering plug-in implements this method, the plug-in's IPrintOemUni::GetImplementedMethod method must return S_OK when it receives "OutputCharStr" as input.
For additional information see Customized Font Management.
|Header||prcomoem.h (include Prcomoem.h)|