~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to src/zfont.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12
12
*/
13
13
 
14
 
/* $Id: zfont.c 8175 2007-08-04 21:42:53Z alexcher $ */
 
14
/* $Id: zfont.c 8250 2007-09-25 13:31:24Z giles $ */
15
15
/* Generic font operators */
16
16
#include "ghost.h"
17
17
#include "oper.h"
31
31
#include "gscencs.h"
32
32
 
33
33
/* Forward references */
34
 
private int make_font(i_ctx_t *, const gs_matrix *);
35
 
private void make_uint_array(os_ptr, const uint *, int);
36
 
private int setup_unicode_decoder(i_ctx_t *i_ctx_p, ref *Decoding);
 
34
static int make_font(i_ctx_t *, const gs_matrix *);
 
35
static void make_uint_array(os_ptr, const uint *, int);
 
36
static int setup_unicode_decoder(i_ctx_t *i_ctx_p, ref *Decoding);
37
37
 
38
38
/* The (global) font directory */
39
39
gs_font_dir *ifont_dir = 0;     /* needed for buildfont */
47
47
}
48
48
 
49
49
/* Get a global glyph code.  */
50
 
private int 
 
50
static int 
51
51
zfont_global_glyph_code(const gs_memory_t *mem, gs_const_string *gstr, gs_glyph *pglyph)
52
52
{
53
53
    ref v;
60
60
}
61
61
 
62
62
/* Initialize the font operators */
63
 
private int
 
63
static int
64
64
zfont_init(i_ctx_t *i_ctx_p)
65
65
{
66
66
    ifont_dir = gs_font_dir_alloc2(imemory, imemory->non_gc_memory);
71
71
}
72
72
 
73
73
/* <font> <scale> scalefont <new_font> */
74
 
private int
 
74
static int
75
75
zscalefont(i_ctx_t *i_ctx_p)
76
76
{
77
77
    os_ptr op = osp;
87
87
}
88
88
 
89
89
/* <font> <matrix> makefont <new_font> */
90
 
private int
 
90
static int
91
91
zmakefont(i_ctx_t *i_ctx_p)
92
92
{
93
93
    os_ptr op = osp;
114
114
}
115
115
 
116
116
/* - currentfont <font> */
117
 
private int
 
117
static int
118
118
zcurrentfont(i_ctx_t *i_ctx_p)
119
119
{
120
120
    os_ptr op = osp;
125
125
}
126
126
 
127
127
/* - cachestatus <mark> <bsize> <bmax> <msize> <mmax> <csize> <cmax> <blimit> */
128
 
private int
 
128
static int
129
129
zcachestatus(i_ctx_t *i_ctx_p)
130
130
{
131
131
    os_ptr op = osp;
138
138
}
139
139
 
140
140
/* <blimit> setcachelimit - */
141
 
private int
 
141
static int
142
142
zsetcachelimit(i_ctx_t *i_ctx_p)
143
143
{
144
144
    os_ptr op = osp;
150
150
}
151
151
 
152
152
/* <mark> <size> <lower> <upper> setcacheparams - */
153
 
private int
 
153
static int
154
154
zsetcacheparams(i_ctx_t *i_ctx_p)
155
155
{
156
156
    os_ptr op = osp;
178
178
}
179
179
 
180
180
/* - currentcacheparams <mark> <size> <lower> <upper> */
181
 
private int
 
181
static int
182
182
zcurrentcacheparams(i_ctx_t *i_ctx_p)
183
183
{
184
184
    os_ptr op = osp;
194
194
}
195
195
 
196
196
/* <font> .registerfont - */
197
 
private int
 
197
static int
198
198
zregisterfont(i_ctx_t *i_ctx_p)
199
199
{
200
200
    os_ptr op = osp;
210
210
 
211
211
 
212
212
/* <Decoding> .setupUnicodeDecoder - */
213
 
private int
 
213
static int
214
214
zsetupUnicodeDecoder(i_ctx_t *i_ctx_p)
215
215
{   /* The allocation mode must be global. */
216
216
    os_ptr op = osp;
287
287
}
288
288
 
289
289
/* Make a transformed font (common code for makefont/scalefont). */
290
 
private int
 
290
static int
291
291
make_font(i_ctx_t *i_ctx_p, const gs_matrix * pmat)
292
292
{
293
293
    os_ptr op = osp;
430
430
}
431
431
 
432
432
/* Convert an array of (unsigned) integers to stack form. */
433
 
private void
 
433
static void
434
434
make_uint_array(register os_ptr op, const uint * intp, int count)
435
435
{
436
436
    int i;
441
441
 
442
442
/* Remove scaled font and character cache entries that would be */
443
443
/* invalidated by a restore. */
444
 
private bool
 
444
static bool
445
445
purge_if_name_removed(const gs_memory_t *mem, cached_char * cc, void *vsave)
446
446
{
447
447
    return alloc_name_index_is_since_save(mem, cc->code, vsave);
551
551
/* ------ Font procedures for PostScript fonts ------ */
552
552
 
553
553
/* font_info procedure */
554
 
private bool
 
554
static bool
555
555
zfont_info_has(const ref *pfidict, const char *key, gs_const_string *pmember)
556
556
{
557
557
    ref *pvalue;
604
604
} gs_unicode_decoder;
605
605
 
606
606
/* GC procedures */
607
 
private 
 
607
static 
608
608
CLEAR_MARKS_PROC(unicode_decoder_clear_marks)
609
609
{   gs_unicode_decoder *const pptr = vptr;
610
610
 
611
611
    r_clear_attrs(&pptr->data, l_mark);
612
612
}
613
 
private 
 
613
static 
614
614
ENUM_PTRS_WITH(unicode_decoder_enum_ptrs, gs_unicode_decoder *pptr) return 0;
615
615
case 0:
616
616
ENUM_RETURN_REF(&pptr->data);
617
617
ENUM_PTRS_END
618
 
private RELOC_PTRS_WITH(unicode_decoder_reloc_ptrs, gs_unicode_decoder *pptr);
 
618
static RELOC_PTRS_WITH(unicode_decoder_reloc_ptrs, gs_unicode_decoder *pptr);
619
619
RELOC_REF_VAR(pptr->data);
620
620
r_clear_attrs(&pptr->data, l_mark);
621
621
RELOC_PTRS_END
633
633
    return (pud == NULL ? NULL : &pud->data);
634
634
}
635
635
 
636
 
private int
 
636
static int
637
637
setup_unicode_decoder(i_ctx_t *i_ctx_p, ref *Decoding)
638
638
{
639
639
    gs_unicode_decoder *pud = gs_alloc_struct(imemory, gs_unicode_decoder,