Commit | Line | Data |
---|---|---|
1bcd5199 WJ |
1 | /* Copyright (C) 1989, 1991 Aladdin Enterprises. All rights reserved. |
2 | Distributed by Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of Ghostscript. | |
5 | ||
6 | Ghostscript is distributed in the hope that it will be useful, but | |
7 | WITHOUT ANY WARRANTY. No author or distributor accepts responsibility | |
8 | to anyone for the consequences of using it or for whether it serves any | |
9 | particular purpose or works at all, unless he says so in writing. Refer | |
10 | to the Ghostscript General Public License for full details. | |
11 | ||
12 | Everyone is granted permission to copy, modify and redistribute | |
13 | Ghostscript, but only under the conditions described in the Ghostscript | |
14 | General Public License. A copy of this license is supposed to have been | |
15 | given to you along with Ghostscript so you can know your rights and | |
16 | responsibilities. It should be in a file named COPYING. Among other | |
17 | things, the copyright notice and this notice must be preserved on all | |
18 | copies. */ | |
19 | ||
20 | /* gsfont.h */ | |
21 | /* Font operations for Ghostscript library */ | |
22 | /* Requires gsmatrix.h */ | |
23 | ||
24 | /* A 'font directory' object (to avoid making fonts global). */ | |
25 | /* 'directory' is something of a misnomer: this structure */ | |
26 | /* actually just keeps track of the scaled font and */ | |
27 | /* rendered character caches. */ | |
28 | #ifndef gs_font_dir_DEFINED | |
29 | # define gs_font_dir_DEFINED | |
30 | typedef struct gs_font_dir_s gs_font_dir; | |
31 | #endif | |
32 | ||
33 | /* Font objects */ | |
34 | typedef struct gs_font_s gs_font; | |
35 | ||
36 | /* Initialization */ | |
37 | /* These procedures return 0 if they fail. */ | |
38 | gs_font_dir *gs_font_dir_alloc(P2(proc_alloc_t, proc_free_t)); | |
39 | gs_font_dir *gs_font_dir_alloc_limits(P7(proc_alloc_t, proc_free_t, | |
40 | uint /*smax*/, uint /*bmax*/, uint /*mmax*/, | |
41 | uint /*cmax*/, uint /*upper*/)); | |
42 | ||
43 | /* Font manipulations */ | |
44 | /* gs_scalefont and gs_makefont return 0 if the scaled font */ | |
45 | /* was already in the cache, 1 if a new font was created. */ | |
46 | /* The second gs_font ** argument returns a font discarded */ | |
47 | /* from the cache (or 0) in the latter case. This is for */ | |
48 | /* the benefit of reference-counted clients. */ | |
49 | int gs_scalefont(P5(gs_font_dir *, gs_font *, floatp, gs_font **, gs_font **)); | |
50 | int gs_makefont(P5(gs_font_dir *, gs_font *, gs_matrix *, gs_font **, gs_font **)); | |
51 | int gs_setfont(P2(gs_state *, gs_font *)); | |
52 | gs_font * gs_currentfont(P1(gs_state *)); | |
53 | void gs_purge_font_from_caches(P2(gs_font_dir *, gs_font *)); | |
54 | ||
55 | /* Font cache parameter operations */ | |
56 | void gs_cachestatus(P2(gs_font_dir *, uint [7])); | |
57 | int gs_setcachelimit(P2(gs_font_dir *, uint)); | |
58 | uint gs_currentcachelower(P1(gs_font_dir *)); | |
59 | int gs_setcachelower(P2(gs_font_dir *, uint)); | |
60 | uint gs_currentcacheupper(P1(gs_font_dir *)); | |
61 | int gs_setcacheupper(P2(gs_font_dir *, uint)); |