File: gsfont.h

package info (click to toggle)
gs 3.33-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 7,436 kB
  • ctags: 15,511
  • sloc: ansic: 92,150; asm: 684; sh: 486; makefile: 91
file content (57 lines) | stat: -rw-r--r-- 2,215 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  
  This file is part of GNU Ghostscript.
  
  GNU Ghostscript is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility to
  anyone for the consequences of using it or for whether it serves any
  particular purpose or works at all, unless he says so in writing.  Refer
  to the GNU Ghostscript General Public License for full details.
  
*/

/* gsfont.h */
/* Client interface to font operations */
/* Requires gsmatrix.h */

/* A 'font directory' object (to avoid making fonts global). */
/* 'directory' is something of a misnomer: this structure */
/* just keeps track of the defined fonts, and the scaled font and */
/* rendered character caches. */
#ifndef gs_font_dir_DEFINED
#  define gs_font_dir_DEFINED	
typedef struct gs_font_dir_s gs_font_dir;
#endif

/* Font objects */
#ifndef gs_font_DEFINED
#  define gs_font_DEFINED
typedef struct gs_font_s gs_font;
#endif

/* Initialization */
/* These procedures return 0 if they fail. */
gs_font_dir	*gs_font_dir_alloc(P1(gs_memory_t *));
gs_font_dir	*gs_font_dir_alloc_limits(P6(gs_memory_t *,
			uint /*smax*/, uint /*bmax*/, uint /*mmax*/,
			uint /*cmax*/, uint /*upper*/));

/* Font manipulations */
/* Use gs_definefont only with original (unscaled) fonts! */
int gs_definefont(P2(gs_font_dir *, gs_font *));
/* gs_scalefont and gs_makefont return 0 if the scaled font */
/* was already in the cache, 1 if a new font was created. */
int	gs_scalefont(P4(gs_font_dir *, const gs_font *, floatp, gs_font **));
int	gs_makefont(P4(gs_font_dir *, const gs_font *, const gs_matrix *, gs_font **));
int	gs_setfont(P2(gs_state *, gs_font *));
gs_font *	gs_currentfont(P1(const gs_state *));
gs_font *	gs_rootfont(P1(const gs_state *));
void	gs_purge_font(P1(const gs_font *));

/* Font cache parameter operations */
void	gs_cachestatus(P2(const gs_font_dir *, uint [7]));
int	gs_setcachelimit(P2(gs_font_dir *, uint));
uint	gs_currentcachelower(P1(const gs_font_dir *));
int	gs_setcachelower(P2(gs_font_dir *, uint));
uint	gs_currentcacheupper(P1(const gs_font_dir *));
int	gs_setcacheupper(P2(gs_font_dir *, uint));