2 |
- |
1 |
/* Copyright (C) 1991, 2000 Aladdin Enterprises. All rights reserved.
|
|
|
2 |
|
|
|
3 |
This software is provided AS-IS with no warranty, either express or
|
|
|
4 |
implied.
|
|
|
5 |
|
|
|
6 |
This software is distributed under license and may not be copied,
|
|
|
7 |
modified or distributed except as expressly authorized under the terms
|
|
|
8 |
of the license contained in the file LICENSE in this distribution.
|
|
|
9 |
|
|
|
10 |
For more information about licensing, please refer to
|
|
|
11 |
http://www.ghostscript.com/licensing/. For information on
|
|
|
12 |
commercial licensing, go to http://www.artifex.com/licensing/ or
|
|
|
13 |
contact Artifex Software, Inc., 101 Lucas Valley Road #110,
|
|
|
14 |
San Rafael, CA 94903, U.S.A., +1(415)492-9861.
|
|
|
15 |
*/
|
|
|
16 |
|
|
|
17 |
/* $Id: gxfapi.c,v 1.6 2002/06/16 05:48:56 lpd Exp $ */
|
|
|
18 |
/* Font API support */
|
|
|
19 |
|
|
|
20 |
/* GS includes : */
|
|
|
21 |
#include "gx.h"
|
|
|
22 |
/* UFST includes : */
|
|
|
23 |
#include "cgconfig.h"
|
|
|
24 |
#include "port.h"
|
|
|
25 |
#include "shareinc.h"
|
|
|
26 |
/* GS includes : */
|
|
|
27 |
#include "gxfapi.h"
|
|
|
28 |
|
|
|
29 |
/* -------------------- UFST callback dispatcher ------------- */
|
|
|
30 |
|
|
|
31 |
/* This code provides dispatching UFST callbacks to GS or PCL. */
|
|
|
32 |
|
|
|
33 |
struct IF_STATE;
|
|
|
34 |
|
|
|
35 |
private LPUB8 stub_PCLEO_charptr(LPUB8 pfont_hdr, UW16 sym_code)
|
|
|
36 |
{ return NULL;
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
private LPUB8 stub_PCLchId2ptr(IF_STATE *pIFS, UW16 chId)
|
|
|
40 |
{ return NULL;
|
|
|
41 |
}
|
|
|
42 |
|
|
|
43 |
private LPUB8 stub_PCLglyphID2Ptr(IF_STATE *pIFS, UW16 glyphID)
|
|
|
44 |
{ return NULL;
|
|
|
45 |
}
|
|
|
46 |
|
|
|
47 |
/*
|
|
|
48 |
The following 3 variables are defined statically until the
|
|
|
49 |
reentrancy of graphics library is fixed.
|
|
|
50 |
Also we are waiting for Agfa to fix the reentrancy of UFST callback PCLEO_charptr.
|
|
|
51 |
*/
|
|
|
52 |
|
|
|
53 |
private LPUB8 (*m_PCLEO_charptr)(LPUB8 pfont_hdr, UW16 sym_code) = stub_PCLEO_charptr;
|
|
|
54 |
private LPUB8 (*m_PCLchId2ptr)(IF_STATE *pIFS, UW16 chId) = stub_PCLchId2ptr;
|
|
|
55 |
private LPUB8 (*m_PCLglyphID2Ptr)(IF_STATE *pIFS, UW16 glyphID) = stub_PCLglyphID2Ptr;
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
LPUB8 PCLEO_charptr(LPUB8 pfont_hdr, UW16 sym_code)
|
|
|
59 |
{ return m_PCLEO_charptr(pfont_hdr, sym_code);
|
|
|
60 |
}
|
|
|
61 |
|
|
|
62 |
LPUB8 PCLchId2ptr(IF_STATE *pIFS, UW16 chId)
|
|
|
63 |
{ return m_PCLchId2ptr(FSA chId);
|
|
|
64 |
}
|
|
|
65 |
|
|
|
66 |
LPUB8 PCLglyphID2Ptr(IF_STATE *pIFS, UW16 glyphID)
|
|
|
67 |
{ return m_PCLglyphID2Ptr(FSA glyphID);
|
|
|
68 |
}
|
|
|
69 |
|
|
|
70 |
void gx_set_UFST_Callbacks(LPUB8 (*p_PCLEO_charptr)(LPUB8 pfont_hdr, UW16 sym_code),
|
|
|
71 |
LPUB8 (*p_PCLchId2ptr)(IF_STATE *pIFS, UW16 chId),
|
|
|
72 |
LPUB8 (*p_PCLglyphID2Ptr)(IF_STATE *pIFS, UW16 glyphID))
|
|
|
73 |
{ m_PCLEO_charptr = p_PCLEO_charptr;
|
|
|
74 |
m_PCLchId2ptr = p_PCLchId2ptr;
|
|
|
75 |
m_PCLglyphID2Ptr = p_PCLglyphID2Ptr;
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
void gx_reset_UFST_Callbacks()
|
|
|
79 |
{ m_PCLEO_charptr = stub_PCLEO_charptr;
|
|
|
80 |
m_PCLchId2ptr = stub_PCLchId2ptr;
|
|
|
81 |
m_PCLglyphID2Ptr = stub_PCLglyphID2Ptr;
|
|
|
82 |
}
|