Add a TeX driver
[pspp] / src / output / tex-glyphs.h
1 /* PSPP - a program for statistical analysis.
2    Copyright (C) 2020 Free Software Foundation, Inc.
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 3 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, see <http://www.gnu.org/licenses/>. */
16
17 #ifndef TEX_GLYPHS_H
18 #define TEX_GLYPHS_H 1
19
20 #include "gl/unitypes.h"
21
22 #include "libpspp/hmap.h"
23
24
25 enum tex_ancilliary
26   {
27    TEX_NONE,
28    TEX_VULGAR_FRAC,
29    TEX_OGONEK,
30    TEX_THORN_UC,
31    TEX_THORN_LC,
32    TEX_GUILLEMET_LEFT,
33    TEX_GUILLEMET_RIGHT,
34    TEX_ETH,
35    TEX_DOT,
36    TEX_DOUBLE_ACUTE
37   };
38
39 extern const char *tex_macro[];
40
41 struct tex_macro
42 {
43   struct hmap_node node;
44   enum tex_ancilliary index;
45 };
46
47
48 struct glyph
49 {
50   ucs4_t code_point;
51   const char *name;
52   enum tex_ancilliary macro;
53   const char *tex_rendering;
54 };
55
56 struct glyph_block
57 {
58   const struct glyph *start;
59   int n_glyphs;
60 };
61
62
63 extern const char *unsupported_glyph;
64
65 extern const struct glyph_block defined_blocks[] ;
66
67 #endif