~ubuntu-branches/ubuntu/oneiric/evince/oneiric-updates

« back to all changes in this revision

Viewing changes to backend/dvi/mdvi-lib/fontmap.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-01-10 19:35:11 UTC
  • mto: (1.3.1 experimental) (52.1.1 hardy-proposed)
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: james.westby@ubuntu.com-20070110193511-yjrnndv8e8wv03yy
Tags: upstream-0.7.1
ImportĀ upstreamĀ versionĀ 0.7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2000, Matias Atria
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
 */
 
18
#ifndef _MDVI_FONTMAP_H
 
19
#define _MDVI_FONTMAP_H 1
 
20
 
 
21
typedef struct _DviFontMapEnt DviFontMapEnt;
 
22
typedef struct _DviEncoding DviEncoding;
 
23
 
 
24
typedef struct {
 
25
        const char *psname;
 
26
        const char *encoding;
 
27
        const char *fontfile;
 
28
        const char *fullfile;
 
29
        const char *fmfile;
 
30
        int fmtype;
 
31
        long extend;
 
32
        long slant;
 
33
} DviFontMapInfo;
 
34
 
 
35
struct _DviEncoding {
 
36
        DviEncoding *next;
 
37
        DviEncoding *prev;
 
38
        char    *private;
 
39
        char    *filename;
 
40
        char    *name;
 
41
        char    **vector; /* table with exactly 256 strings */
 
42
        int     links;
 
43
        long    offset;
 
44
        DviHashTable nametab;
 
45
};
 
46
 
 
47
struct _DviFontMapEnt {
 
48
        DviFontMapEnt *next;
 
49
        DviFontMapEnt *prev;
 
50
        char    *private;
 
51
        char    *fontname;
 
52
        char    *psname;
 
53
        char    *encoding;
 
54
        char    *encfile;
 
55
        char    *fontfile;
 
56
        char    *fullfile;
 
57
        long    extend;
 
58
        long    slant;
 
59
};
 
60
 
 
61
#define MDVI_FMAP_SLANT(x)      ((double)(x)->slant / 10000.0)
 
62
#define MDVI_FMAP_EXTEND(x)     ((double)(x)->extend / 10000.0)
 
63
 
 
64
extern DviEncoding *mdvi_request_encoding __PROTO((const char *));
 
65
extern void mdvi_release_encoding __PROTO((DviEncoding *, int));
 
66
extern int  mdvi_encode_glyph __PROTO((DviEncoding *, const char *));
 
67
extern DviFontMapEnt *mdvi_load_fontmap __PROTO((const char *));
 
68
extern void mdvi_install_fontmap __PROTO((DviFontMapEnt *));
 
69
extern int  mdvi_load_fontmaps __PROTO((void));
 
70
extern int  mdvi_query_fontmap __PROTO((DviFontMapInfo *, const char *));
 
71
extern void mdvi_flush_encodings __PROTO((void));
 
72
extern void mdvi_flush_fontmaps __PROTO((void));
 
73
 
 
74
extern int  mdvi_add_fontmap_file __PROTO((const char *, const char *));
 
75
 
 
76
/* PS font maps */
 
77
extern int  mdvi_ps_read_fontmap __PROTO((const char *));
 
78
extern char *mdvi_ps_find_font __PROTO((const char *));
 
79
extern TFMInfo *mdvi_ps_get_metrics __PROTO((const char *));
 
80
extern void mdvi_ps_flush_fonts __PROTO((void));
 
81
 
 
82
#endif /* _MDVI_FONTMAP_H */