|
|
For other information, see the Ghostscript overview.
Ghostscript can use the character rasterizer provided by the underlying operating system and window system; specifically, Adobe Type Manager (ATM) or a TrueType rasterizer under MS Windows, or the facilities provided by X Windows. This ability augments, but does not replace, Ghostscript's own Type 1 rasterizer: Ghostscript may still use its own rasterizer for very large characters, characters that are clipped or transformed in unusual ways, and for output to devices other than the screen.
Ghostscript connects to these platform facilities through a driver-like interface called the xfont (external font) interface. Current xfont implementations are associated directly with device drivers; in a future release, Ghostscript may separate them, so that (for example) it will be possible to use the platform rasterizer when writing to a file.
Please note that from this point, this file is likely to be useful only to a small number of Ghostscript porters and implementors.
Type | Declared / defined in | Represents | ||
---|---|---|---|---|
gs_char | gsccode.h | A character code that appears in a string. Currently it is always a single byte, but composite fonts or Unicode may require it to be wider in the future. | ||
gs_glyph | gsccode.h | A character name like "period" or "epsilon". From the xfont implementation's point of view, it is just a handle; when necessary, Ghostscript provides a gs_proc_glyph_name_t procedure to convert it to a string name. | ||
gs_proc_glyph_name_t | gsccode.h | A procedure that maps a gs_glyph to its string name; see the char_xglyph procedure. | ||
gx_xglyph | gsxfont.h | A character or glyph code that can be used with a specific platform font. Normally it will be a character code that the implementation of render_char will turn into a 1-character string and give to the platform's "display string" operation. | ||
gx_xfont_procs | gsxfont.h, gxxfont.h | The xfont analogue of gx_device_procs, the type of the procedure record that defines an xfont implementation. | ||
gx_xfont | gsxfont.h, gxxfont.h | The gxfont analogue of gx_device, the type of the basic structure for an xfont. | ||
(encoding_index) | Not really a type, although it probably should be:
an int used to indicate the
Encoding used by a font. Defined values are
|
All the procedures that return int results return 0 on success, or an appropriate negative error code for error conditions; these error codes are defined in gserrors.h. The relevant ones are the same as for drivers, and as with drivers, if an implementation procedure returns an error, it should use the return_error macro -- defined in gx.h, which is automatically included by gdevprn.h but not by gserrors.h -- rather than a simple return statement, for instance
return_error(gs_error_VMerror);
Note that this is the only implementation procedure that does not take an xfont * as its first argument. In fact, callers of lookup_font must use the get_xfont_device driver procedure to get the correct device to pass as the first argument to lookup_font.
Copyright © 1996, 1997, 1998 Aladdin Enterprises. All rights reserved.
This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of the license contained in the file LICENSE in this distribution.
Ghostscript version 7.07, 17 May 2003