3 Free Software Foundation, Inc.
4 Written by Werner Lemberg <wl@gnu.org>
6 This file is part of groff.
8 groff is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2, or (at your option) any later
13 groff is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 You should have received a copy of the GNU General Public License along
19 with groff; see the file COPYING. If not, write to the Free Software
20 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
23 #include "stringclass.h"
28 struct unicode_to_glyph
{
32 declare_ptable(unicode_to_glyph
)
33 implement_ptable(unicode_to_glyph
)
35 PTABLE(unicode_to_glyph
) unicode_to_glyph_table
;
40 } unicode_to_glyph_list
[] = {
75 { "003D_0338", "!=" },
81 { "0041_0300", "`A" },
82 { "0041_0301", "'A" },
83 { "0041_0302", "^A" },
84 { "0041_0303", "~A" },
85 { "0041_0308", ":A" },
86 { "0041_030A", "oA" },
89 { "0043_0327", ",C" },
92 { "0045_0300", "`E" },
93 { "0045_0301", "'E" },
94 { "0045_0302", "^E" },
95 { "0045_0308", ":E" },
100 { "0049_0300", "`I" },
101 { "0049_0301", "'I" },
102 { "0049_0302", "^I" },
103 { "0049_0308", ":I" },
109 { "004E_0303", "~N" },
111 { "004F_0300", "`O" },
112 { "004F_0301", "'O" },
113 { "004F_0302", "^O" },
114 { "004F_0303", "~O" },
115 { "004F_0308", ":O" },
120 { "0053_030C", "vS" },
123 { "0055_0300", "`U" },
124 { "0055_0301", "'U" },
125 { "0055_0302", "^U" },
126 { "0055_0308", ":U" },
131 { "0059_0301", "'Y" },
132 { "0059_0308", ":Y" },
134 { "005A_030C", "vZ" },
150 { "0061_0300", "`a" },
151 { "0061_0301", "'a" },
152 { "0061_0302", "^a" },
153 { "0061_0303", "~a" },
154 { "0061_0308", ":a" },
155 { "0061_030A", "oa" },
158 { "0063_0327", ",c" },
161 { "0065_0300", "`e" },
162 { "0065_0301", "'e" },
163 { "0065_0302", "^e" },
164 { "0065_0308", ":e" },
169 { "0069_0300", "`i" },
170 { "0069_0301", "'i" },
171 { "0069_0302", "^i" },
172 { "0069_0308", ":i" },
178 { "006E_0303", "~n" },
180 { "006F_0300", "`o" },
181 { "006F_0301", "'o" },
182 { "006F_0302", "^o" },
183 { "006F_0303", "~o" },
184 { "006F_0308", ":o" },
189 { "0073_030C", "vs" },
192 { "0075_0300", "`u" },
193 { "0075_0301", "'u" },
194 { "0075_0302", "^u" },
195 { "0075_0308", ":u" },
200 { "0079_0301", "'y" },
201 { "0079_0308", ":y" },
203 { "007A_030C", "vz" },
369 { "2208_0338", "nm" },
371 { "220F", "product" },
398 { "2282_0338", "nb" },
438 // global constructor
439 static struct unicode_to_glyph_init
{
440 unicode_to_glyph_init();
441 } _unicode_to_glyph_init
;
443 unicode_to_glyph_init::unicode_to_glyph_init() {
444 for (unsigned int i
= 0;
445 i
< sizeof(unicode_to_glyph_list
)/sizeof(unicode_to_glyph_list
[0]);
447 unicode_to_glyph
*utg
= new unicode_to_glyph
;
448 utg
->value
= unicode_to_glyph_list
[i
].value
;
449 unicode_to_glyph_table
.define(unicode_to_glyph_list
[i
].key
, utg
);
453 const char *unicode_to_glyph_name(const char *s
)
455 unicode_to_glyph
*result
= unicode_to_glyph_table
.lookup(s
);
456 return result
? result
->value
: 0;