Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
fontmap.h
Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  */
18 #ifndef _MDVI_FONTMAP_H
19 #define _MDVI_FONTMAP_H 1
20 
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;
34 
35 struct _DviEncoding {
38  char *private;
39  char *filename;
40  char *name;
41  char **vector; /* table with exactly 256 strings */
42  int links;
43  long offset;
45 };
46 
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 *));
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 */