* lib/text.h: Added text_get_line() declaration
[dia.git] / lib / ps-utf8.c
blob3d69740fe367d85a999d7bd1ea97d5f4438c8f31
1 /* Dia -- an diagram creation/manipulation program
2 * Copyright (C) 1998 Alexander Larsson
4 * ps-utf8.c: builds custom Postscript encodings to write arbitrary utf8
5 * strings and have the device understand what's going on.
6 * Copyright (C) 2001 Cyrille Chepelov <chepelov@calixo.net>
7 *
8 * Portions derived from Gnome-Print/gp-ps-unicode.c, written by
9 * Lauris Kaplinski <lauris@helixcode.com>,
10 * Copyright (C) 1999-2000 Helix Code, Inc.
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #include "ps-utf8.h"
28 #include <config.h>
29 #include <stdlib.h>
30 #include <string.h>
31 #include <glib.h>
33 /* forward prototypes */
34 static gchar *make_font_descriptor_name(const gchar *face,
35 const gchar *encoding);
37 static PSFontDescriptor *font_descriptor_new(const gchar *face,
38 const PSEncodingPage *encoding,
39 const gchar *name);
41 static void font_descriptor_destroy(PSFontDescriptor *fd);
42 static void use_font(PSUnicoder *psu, PSFontDescriptor *fd);
43 static PSEncodingPage *encoding_page_new(int num);
44 static void encoding_page_destroy(PSEncodingPage *ep);
45 static int encoding_page_add_unichar(PSEncodingPage *ep,
46 gunichar uchar);
48 static void use_encoding(PSUnicoder *psu, PSEncodingPage *ep);
50 static void psu_add_encoding(PSUnicoder *psu, gunichar uchar);
51 static void psu_make_new_encoding_page(PSUnicoder *psu);
52 /* Unicoder functions */
54 extern PSUnicoder *ps_unicoder_new(const PSUnicoderCallbacks *psucbk,
55 gpointer usrdata)
57 PSUnicoder *psu = g_new0(PSUnicoder,1);
58 psu->usrdata = usrdata;
59 psu->callbacks = psucbk;
61 psu->defined_fonts = g_hash_table_new(g_str_hash,g_str_equal);
62 psu->unicode_to_page = g_hash_table_new(NULL,NULL);
64 psu_make_new_encoding_page(psu);
65 return psu;
68 static gboolean
69 ghrfunc_remove_font(gpointer key, gpointer value, gpointer user_data)
71 font_descriptor_destroy((PSFontDescriptor *)value);
72 return TRUE;
75 static void
76 gfunc_free_encoding_page(gpointer item, gpointer user_data)
78 encoding_page_destroy((PSEncodingPage *)item);
82 extern void ps_unicoder_destroy(PSUnicoder *psu)
84 g_hash_table_destroy(psu->unicode_to_page);
85 g_hash_table_foreach_remove(psu->defined_fonts,
86 ghrfunc_remove_font,
87 NULL);
88 g_hash_table_destroy(psu->defined_fonts);
89 g_slist_foreach(psu->encoding_pages,
90 gfunc_free_encoding_page,
91 NULL);
92 g_free(psu);
95 extern void
96 psu_set_font_face(PSUnicoder *psu, const gchar *face, float size)
98 psu->face = face;
99 psu->size = size;
100 psu->current_font = NULL;
103 static void psu_make_new_encoding_page(PSUnicoder *psu)
105 int num = 0;
106 PSEncodingPage *ep;
108 if (psu->last_page) num = psu->last_page->page_num + 1;
109 ep = encoding_page_new(num);
110 psu->last_page = ep;
111 psu->encoding_pages = g_slist_append(psu->encoding_pages,ep);
113 if (num == 1) {
114 g_warning("You are going to use more than %d different characters; dia will begin to \n"
115 "heavily use encoding switching. This feature has never been tested; \n"
116 "please report success or crash to chepelov@calixo.net. Thank you very much.\n",
117 PSEPAGE_SIZE);
121 static void psu_add_encoding(PSUnicoder *psu, gunichar uchar)
123 if (g_hash_table_lookup(psu->unicode_to_page,
124 GINT_TO_POINTER(uchar))) {
125 return;
127 if (!encoding_page_add_unichar(psu->last_page,uchar)) {
128 psu_make_new_encoding_page(psu);
129 if (!encoding_page_add_unichar(psu->last_page,uchar))
130 g_assert_not_reached();
132 g_hash_table_insert(psu->unicode_to_page,
133 GINT_TO_POINTER(uchar),
134 psu->last_page);
135 if (psu->last_page == psu->current_encoding) {
136 psu->current_encoding = NULL; /* so that it's re-emitted. */
137 psu->current_font = NULL; /* anyway it will have to be re-emitted too. */
141 extern void
142 psu_check_string_encodings(PSUnicoder *psu,
143 const char *utf8_string)
145 gunichar uchar;
146 const char *p = utf8_string;
148 while (p && (*p)) {
149 uchar = g_utf8_get_char(p);
150 p = g_utf8_next_char(p);
152 psu_add_encoding(psu,uchar);
153 if ((uchar > 32) && (uchar < 2048)) {
154 psu_add_encoding(psu,uchar);
159 #define BUFSIZE 256
161 typedef void (*FlushFunc)(const PSUnicoder *psu,
162 const gchar *buf,
163 gboolean first);
166 static void psu_show_flush_buffer(const PSUnicoder *psu,
167 gchar buf[], int *bufu,
168 FlushFunc flush,gboolean first)
170 buf[*bufu] = 0;
171 (*flush)(psu,buf,first);
172 *bufu = 0;
176 static void
177 encoded_psu_show_string(PSUnicoder *psu,
178 const char *utf8_string,
179 FlushFunc flushfunc)
181 gunichar uchar;
182 gchar c;
183 gchar buf[BUFSIZE];
184 int bufu = 0;
185 gboolean first = TRUE;
186 size_t len = 0;
187 const char *p = utf8_string;
189 while (p && (*p)) {
190 uchar = g_utf8_get_char(p);
191 p = g_utf8_next_char(p);
192 len++;
194 if (psu->current_encoding) {
195 c =
196 (gchar)GPOINTER_TO_INT(g_hash_table_lookup(psu->current_encoding->backpage,
197 GINT_TO_POINTER(uchar)));
198 } else {
199 c = 0;
202 if (!c) {
203 /* No page or not the right page... switch ! */
204 PSEncodingPage *ep = g_hash_table_lookup(psu->unicode_to_page,
205 GINT_TO_POINTER(uchar));
206 if (ep) {
207 use_encoding(psu,ep);
208 /* now psu->current_encoding == ep */
209 c = (gchar)GPOINTER_TO_INT(g_hash_table_lookup(ep->backpage,
210 GINT_TO_POINTER(uchar)));
211 } else {
212 c = 31;
215 if ((!c)||(c==31)) {
216 g_message("uchar %.4X has not been found in the encoding pages !",uchar);
217 g_assert_not_reached();
220 /* We now are in the right page, and c is the image of uchar with that
221 encoding. */
223 if ( ((!psu->current_font) ||
224 (psu->current_font->encoding != psu->current_encoding))) {
225 PSFontDescriptor *fd;
226 const gchar *font_name;
227 if (bufu) {
228 psu_show_flush_buffer(psu,buf,&bufu,flushfunc,first);
229 first = FALSE;
232 font_name = make_font_descriptor_name(psu->face,
233 psu->current_encoding->name);
234 fd = g_hash_table_lookup(psu->defined_fonts,font_name);
235 if (fd) {
236 g_free((gpointer)font_name);
237 font_name = fd->name;
238 } else {
239 fd = font_descriptor_new(psu->face,
240 psu->current_encoding,
241 font_name);
242 g_free((gpointer)font_name);
243 font_name = fd->name;
244 g_hash_table_insert(psu->defined_fonts,(gpointer)font_name,fd);
246 use_font(psu,fd);
248 if (bufu >= BUFSIZE - 2) {
249 psu_show_flush_buffer(psu,buf,&bufu,flushfunc,first);
250 first = FALSE;
252 buf[bufu++] = c;
254 if ((bufu)||(!len)) /* even if !len, to avoid crashing the PS stack. */
255 psu_show_flush_buffer(psu,buf,&bufu,flushfunc,first);
258 static void
259 symbol_psu_show_string(PSUnicoder *psu,
260 const char *utf8_string,
261 FlushFunc flushfunc)
263 /* Special case with Symbol fonts: */
264 gunichar uchar;
265 gchar c;
266 gchar buf[BUFSIZE];
267 int bufu = 0;
268 gboolean first = TRUE;
269 size_t len = 0;
270 const char *p = utf8_string;
271 PSFontDescriptor *fd;
272 const gchar *font_name = "Symbol";
274 /* Locate and use the Symbol font (bare): */
276 fd = g_hash_table_lookup(psu->defined_fonts,font_name);
277 if (fd) {
278 font_name = fd->name;
279 } else {
280 fd = font_descriptor_new(psu->face,
281 NULL,
282 font_name);
283 font_name = fd->name;
284 g_hash_table_insert(psu->defined_fonts,(gpointer)font_name,fd);
286 use_font(psu,fd);
288 /* We have the Symbol font loaded. */
290 while (p && (*p)) {
291 uchar = g_utf8_get_char(p);
292 p = g_utf8_next_char(p);
293 len++;
295 if (uchar < 256) c = uchar;
296 else c = '?';
298 switch (c) {
299 case ')':
300 case '(':
301 case '\\':
302 buf[bufu++] = '\\';
303 buf[bufu++] = c;
304 break;
305 default:
306 buf[bufu++] = c;
309 if (bufu >= BUFSIZE - 3) {
310 psu_show_flush_buffer(psu,buf,&bufu,flushfunc,first);
311 first = FALSE;
315 if ((bufu)||(!len)) /* even if !len, to avoid crashing the PS stack. */
316 psu_show_flush_buffer(psu,buf,&bufu,flushfunc,first);
319 static void
320 flush_show_string(const PSUnicoder *psu,
321 const gchar *buf,
322 gboolean first)
324 psu->callbacks->show_string(psu->usrdata,buf);
327 extern void
328 psu_show_string(PSUnicoder *psu,
329 const char *utf8_string)
331 if (0==strcmp(psu->face,"Symbol")) {
332 symbol_psu_show_string(psu,utf8_string,&flush_show_string);
333 } else {
334 encoded_psu_show_string(psu,utf8_string,&flush_show_string);
339 static void
340 flush_get_string_width(const PSUnicoder *psu,
341 const char *buf,
342 gboolean first)
344 psu->callbacks->get_string_width(psu->usrdata,buf,first);
347 extern void
348 psu_get_string_width(PSUnicoder *psu,
349 const char *utf8_string)
351 if (0==strcmp(psu->face,"Symbol")) {
352 symbol_psu_show_string(psu,utf8_string,&flush_get_string_width);
353 } else {
354 encoded_psu_show_string(psu,utf8_string,&flush_get_string_width);
359 /* Encoding Page functions */
361 static PSEncodingPage *
362 encoding_page_new(int num)
364 PSEncodingPage *ep = g_new0(PSEncodingPage,1);
366 ep->name = g_strdup_printf("e%d",num);
367 ep->page_num = 0;
368 ep->serial_num = 0;
369 ep->last_realized = -1;
370 ep->entries = 0;
371 ep->backpage = g_hash_table_new(NULL,NULL);
372 return ep;
375 static void encoding_page_destroy(PSEncodingPage *ep)
377 g_free((gpointer)ep->name);
378 g_hash_table_destroy(ep->backpage);
379 g_free(ep);
382 static int
383 encoding_page_add_unichar(PSEncodingPage *ep, gunichar uchar)
385 int res;
386 if (ep->entries >= PSEPAGE_SIZE) return 0; /* page is full. */
388 while ((ep->entries == (')'-PSEPAGE_BEGIN)) ||
389 (ep->entries == ('\\' - PSEPAGE_BEGIN)) ||
390 (ep->entries == ('('-PSEPAGE_BEGIN))) ep->entries++;
392 res = ep->entries++;
394 ep->page[res] = uchar;
396 res += PSEPAGE_BEGIN;
397 g_hash_table_insert(ep->backpage,
398 GINT_TO_POINTER(uchar),GINT_TO_POINTER(res));
399 ep->serial_num++;
400 return res;
404 static void
405 use_encoding(PSUnicoder *psu, PSEncodingPage *ep)
407 if (ep->serial_num != ep->last_realized) {
408 psu->callbacks->build_ps_encoding(psu->usrdata,
409 ep->name,
410 ep->page);
411 ep->last_realized = ep->serial_num;
413 psu->current_encoding = ep;
416 /* DiaFont descriptor functions */
418 static gchar *
419 make_font_descriptor_name(const gchar *face,
420 const gchar *encoding)
422 return g_strdup_printf("%s_%s",face,encoding);
425 static PSFontDescriptor *
426 font_descriptor_new(const gchar *face,
427 const PSEncodingPage *encoding,
428 const gchar *name)
430 PSFontDescriptor *fd = g_new(PSFontDescriptor,1);
432 fd->face = face;
433 fd->encoding = encoding;
434 fd->encoding_serial_num = -1;
436 if (name)
437 fd->name = g_strdup(name);
438 else
439 fd->name = make_font_descriptor_name(face,encoding->name);
440 return fd;
443 static void
444 font_descriptor_destroy(PSFontDescriptor *fd)
446 g_free((gpointer)fd->name);
447 g_free(fd);
450 static void
451 use_font(PSUnicoder *psu, PSFontDescriptor *fd)
453 if (psu->current_font == fd) return; /* Already done. */
455 if (!fd->encoding) { /* bare font. No encoding. */
456 psu->callbacks->select_ps_font(psu->usrdata,fd->name,psu->size);
457 } else {
458 gboolean undef,define,select;
460 define = (fd->encoding->serial_num != fd->encoding_serial_num);
461 undef = (define && (fd->encoding_serial_num <= 0));
462 select = ((psu->current_font != fd) || (psu->current_size != psu->size));
464 if (undef) psu->callbacks->destroy_ps_font(psu->usrdata,fd->name);
465 if (define) psu->callbacks->build_ps_font(psu->usrdata,fd->name,
466 fd->face, fd->encoding->name);
467 fd->encoding_serial_num = fd->encoding->serial_num;
468 if (select) psu->callbacks->select_ps_font(psu->usrdata,
469 fd->name,
470 psu->size);
473 psu->current_size = psu->size;
474 psu->current_font = fd;
475 psu->current_encoding = fd->encoding;
479 /* ------------------------------------------------------------------- */
480 /* Conversion from unicode char numbers (16-bit) to Adobe entity names */
481 /* The big table is derived from Gnome-Print's gp-ps-unicode.c */
482 /* ------------------------------------------------------------------- */
484 typedef struct {
485 gint unicode;
486 gchar * name;
487 } GPPSUniTab;
489 static GPPSUniTab unitab[] = {
490 { 0x0041, "A" },
491 { 0x00C6, "AE" },
492 { 0x01FC, "AEacute" },
493 { 0xF7E6, "AEsmall" },
494 { 0x00C1, "Aacute" },
495 { 0xF7E1, "Aacutesmall" },
496 { 0x0102, "Abreve" },
497 { 0x00C2, "Acircumflex" },
498 { 0xF7E2, "Acircumflexsmall" },
499 { 0xF6C9, "Acute" },
500 { 0xF7B4, "Acutesmall" },
501 { 0x00C4, "Adieresis" },
502 { 0xF7E4, "Adieresissmall" },
503 { 0x00C0, "Agrave" },
504 { 0xF7E0, "Agravesmall" },
505 { 0x0391, "Alpha" },
506 { 0x0386, "Alphatonos" },
507 { 0x0100, "Amacron" },
508 { 0x0104, "Aogonek" },
509 { 0x00C5, "Aring" },
510 { 0x01FA, "Aringacute" },
511 { 0xF7E5, "Aringsmall" },
512 { 0xF761, "Asmall" },
513 { 0x00C3, "Atilde" },
514 { 0xF7E3, "Atildesmall" },
515 { 0x0042, "B" },
516 { 0x0392, "Beta" },
517 { 0xF6F4, "Brevesmall" },
518 { 0xF762, "Bsmall" },
519 { 0x0043, "C" },
520 { 0x0106, "Cacute" },
521 { 0xF6CA, "Caron" },
522 { 0xF6F5, "Caronsmall" },
523 { 0x010C, "Ccaron" },
524 { 0x00C7, "Ccedilla" },
525 { 0xF7E7, "Ccedillasmall" },
526 { 0x0108, "Ccircumflex" },
527 { 0x010A, "Cdotaccent" },
528 { 0xF7B8, "Cedillasmall" },
529 { 0x03A7, "Chi" },
530 { 0xF6F6, "Circumflexsmall" },
531 { 0xF763, "Csmall" },
532 { 0x0044, "D" },
533 { 0x010E, "Dcaron" },
534 { 0x0110, "Dcroat" },
535 { 0x2206, "Delta" },
536 { 0x0394, "Delta" },
537 { 0xF6CB, "Dieresis" },
538 { 0xF6CC, "DieresisAcute" },
539 { 0xF6CD, "DieresisGrave" },
540 { 0xF7A8, "Dieresissmall" },
541 { 0xF6F7, "Dotaccentsmall" },
542 { 0xF764, "Dsmall" },
543 { 0x0045, "E" },
544 { 0x00C9, "Eacute" },
545 { 0xF7E9, "Eacutesmall" },
546 { 0x0114, "Ebreve" },
547 { 0x011A, "Ecaron" },
548 { 0x00CA, "Ecircumflex" },
549 { 0xF7EA, "Ecircumflexsmall" },
550 { 0x00CB, "Edieresis" },
551 { 0xF7EB, "Edieresissmall" },
552 { 0x0116, "Edotaccent" },
553 { 0x00C8, "Egrave" },
554 { 0xF7E8, "Egravesmall" },
555 { 0x0112, "Emacron" },
556 { 0x014A, "Eng" },
557 { 0x0118, "Eogonek" },
558 { 0x0395, "Epsilon" },
559 { 0x0388, "Epsilontonos" },
560 { 0xF765, "Esmall" },
561 { 0x0397, "Eta" },
562 { 0x0389, "Etatonos" },
563 { 0x00D0, "Eth" },
564 { 0xF7F0, "Ethsmall" },
565 { 0x20AC, "Euro" },
566 { 0x0046, "F" },
567 { 0xF766, "Fsmall" },
568 { 0x0047, "G" },
569 { 0x0393, "Gamma" },
570 { 0x011E, "Gbreve" },
571 { 0x01E6, "Gcaron" },
572 { 0x011C, "Gcircumflex" },
573 { 0x0122, "Gcommaaccent" },
574 { 0x0120, "Gdotaccent" },
575 { 0xF6CE, "Grave" },
576 { 0xF760, "Gravesmall" },
577 { 0xF767, "Gsmall" },
578 { 0x0048, "H" },
579 { 0x25CF, "H18533" },
580 { 0x25AA, "H18543" },
581 { 0x25AB, "H18551" },
582 { 0x25A1, "H22073" },
583 { 0x0126, "Hbar" },
584 { 0x0124, "Hcircumflex" },
585 { 0xF768, "Hsmall" },
586 { 0xF6CF, "Hungarumlaut" },
587 { 0xF6F8, "Hungarumlautsmall" },
588 { 0x0049, "I" },
589 { 0x0132, "IJ" },
590 { 0x00CD, "Iacute" },
591 { 0xF7ED, "Iacutesmall" },
593 { 0x012C, "Ibreve" },
594 { 0x00CE, "Icircumflex" },
595 { 0xF7EE, "Icircumflexsmall" },
596 { 0x00CF, "Idieresis" },
597 { 0xF7EF, "Idieresissmall" },
598 { 0x0130, "Idotaccent" },
599 { 0x2111, "Ifraktur" },
600 { 0x00CC, "Igrave" },
601 { 0xF7EC, "Igravesmall" },
602 { 0x012A, "Imacron" },
603 { 0x012E, "Iogonek" },
604 { 0x0399, "Iota" },
605 { 0x03AA, "Iotadieresis" },
606 { 0x038A, "Iotatonos" },
607 { 0xF769, "Ismall" },
608 { 0x0128, "Itilde" },
609 { 0x004A, "J" },
610 { 0x0134, "Jcircumflex" },
611 { 0xF76A, "Jsmall" },
612 { 0x004B, "K" },
613 { 0x039A, "Kappa" },
614 { 0x0136, "Kcommaaccent" },
615 { 0xF76B, "Ksmall" },
616 { 0x004C, "L" },
617 { 0xF6BF, "LL" },
618 { 0x0139, "Lacute" },
619 { 0x039B, "Lambda" },
620 { 0x013D, "Lcaron" },
621 { 0x013B, "Lcommaaccent" },
622 { 0x013F, "Ldot" },
623 { 0x0141, "Lslash" },
624 { 0xF6F9, "Lslashsmall" },
625 { 0xF76C, "Lsmall" },
626 { 0x004D, "M" },
627 { 0xF6D0, "Macron" },
628 { 0xF7AF, "Macronsmall" },
629 { 0xF76D, "Msmall" },
630 { 0x039C, "Mu" },
631 { 0x004E, "N" },
632 { 0x0143, "Nacute" },
633 { 0x0147, "Ncaron" },
634 { 0x0145, "Ncommaaccent" },
635 { 0xF76E, "Nsmall" },
636 { 0x00D1, "Ntilde" },
637 { 0xF7F1, "Ntildesmall" },
638 { 0x039D, "Nu" },
639 { 0x004F, "O" },
640 { 0x0152, "OE" },
641 { 0xF6FA, "OEsmall" },
642 { 0x00D3, "Oacute" },
643 { 0xF7F3, "Oacutesmall" },
644 { 0x014E, "Obreve" },
645 { 0x00D4, "Ocircumflex" },
646 { 0xF7F4, "Ocircumflexsmall" },
647 { 0x00D6, "Odieresis" },
648 { 0xF7F6, "Odieresissmall" },
649 { 0xF6FB, "Ogoneksmall" },
650 { 0x00D2, "Ograve" },
651 { 0xF7F2, "Ogravesmall" },
652 { 0x01A0, "Ohorn" },
653 { 0x0150, "Ohungarumlaut" },
654 { 0x014C, "Omacron" },
655 { 0x2126, "Omega" },
656 { 0x03A9, "Omega" },
657 { 0x038F, "Omegatonos" },
658 { 0x039F, "Omicron" },
659 { 0x038C, "Omicrontonos" },
660 { 0x00D8, "Oslash" },
661 { 0x01FE, "Oslashacute" },
662 { 0xF7F8, "Oslashsmall" },
663 { 0xF76F, "Osmall" },
664 { 0x00D5, "Otilde" },
665 { 0xF7F5, "Otildesmall" },
666 { 0x0050, "P" },
667 { 0x03A6, "Phi" },
668 { 0x03A0, "Pi" },
669 { 0x03A8, "Psi" },
670 { 0xF770, "Psmall" },
671 { 0x0051, "Q" },
672 { 0xF771, "Qsmall" },
673 { 0x0052, "R" },
674 { 0x0154, "Racute" },
675 { 0x0158, "Rcaron" },
676 { 0x0156, "Rcommaaccent" },
677 { 0x211C, "Rfraktur" },
678 { 0x03A1, "Rho" },
679 { 0xF6FC, "Ringsmall" },
680 { 0xF772, "Rsmall" },
681 { 0x0053, "S" },
682 { 0x250C, "SF010000" },
683 { 0x2514, "SF020000" },
684 { 0x2510, "SF030000" },
685 { 0x2518, "SF040000" },
686 { 0x253C, "SF050000" },
687 { 0x252C, "SF060000" },
688 { 0x2534, "SF070000" },
689 { 0x251C, "SF080000" },
690 { 0x2524, "SF090000" },
691 { 0x2500, "SF100000" },
692 { 0x2502, "SF110000" },
693 { 0x2561, "SF190000" },
694 { 0x2562, "SF200000" },
695 { 0x2556, "SF210000" },
696 { 0x2555, "SF220000" },
697 { 0x2563, "SF230000" },
698 { 0x2551, "SF240000" },
699 { 0x2557, "SF250000" },
700 { 0x255D, "SF260000" },
701 { 0x255C, "SF270000" },
702 { 0x255B, "SF280000" },
703 { 0x255E, "SF360000" },
704 { 0x255F, "SF370000" },
705 { 0x255A, "SF380000" },
706 { 0x2554, "SF390000" },
707 { 0x2569, "SF400000" },
708 { 0x2566, "SF410000" },
709 { 0x2560, "SF420000" },
710 { 0x2550, "SF430000" },
711 { 0x256C, "SF440000" },
712 { 0x2567, "SF450000" },
713 { 0x2568, "SF460000" },
714 { 0x2564, "SF470000" },
715 { 0x2565, "SF480000" },
716 { 0x2559, "SF490000" },
717 { 0x2558, "SF500000" },
718 { 0x2552, "SF510000" },
719 { 0x2553, "SF520000" },
720 { 0x256B, "SF530000" },
721 { 0x256A, "SF540000" },
722 { 0x015A, "Sacute" },
723 { 0x0160, "Scaron" },
724 { 0xF6FD, "Scaronsmall" },
725 { 0x015E, "Scedilla" },
726 { 0xF6C1, "Scedilla" },
727 { 0x015C, "Scircumflex" },
728 { 0x0218, "Scommaaccent" },
729 { 0x03A3, "Sigma" },
730 { 0xF773, "Ssmall" },
731 { 0x0054, "T" },
732 { 0x03A4, "Tau" },
733 { 0x0166, "Tbar" },
734 { 0x0164, "Tcaron" },
735 { 0x0162, "Tcommaaccent" },
736 { 0x021A, "Tcommaaccent" },
737 { 0x0398, "Theta" },
738 { 0x00DE, "Thorn" },
739 { 0xF7FE, "Thornsmall" },
740 { 0xF6FE, "Tildesmall" },
741 { 0xF774, "Tsmall" },
742 { 0x0055, "U" },
743 { 0x00DA, "Uacute" },
744 { 0xF7FA, "Uacutesmall" },
745 { 0x016C, "Ubreve" },
746 { 0x00DB, "Ucircumflex" },
747 { 0xF7FB, "Ucircumflexsmall" },
748 { 0x00DC, "Udieresis" },
749 { 0xF7FC, "Udieresissmall" },
750 { 0x00D9, "Ugrave" },
751 { 0xF7F9, "Ugravesmall" },
752 { 0x01AF, "Uhorn" },
753 { 0x0170, "Uhungarumlaut" },
754 { 0x016A, "Umacron" },
755 { 0x0172, "Uogonek" },
756 { 0x03A5, "Upsilon" },
757 { 0x03D2, "Upsilon1" },
758 { 0x03AB, "Upsilondieresis" },
759 { 0x038E, "Upsilontonos" },
760 { 0x016E, "Uring" },
761 { 0xF775, "Usmall" },
762 { 0x0168, "Utilde" },
763 { 0x0056, "V" },
764 { 0xF776, "Vsmall" },
765 { 0x0057, "W" },
766 { 0x1E82, "Wacute" },
767 { 0x0174, "Wcircumflex" },
768 { 0x1E84, "Wdieresis" },
769 { 0x1E80, "Wgrave" },
770 { 0xF777, "Wsmall" },
771 { 0x0058, "X" },
772 { 0x039E, "Xi" },
773 { 0xF778, "Xsmall" },
774 { 0x0059, "Y" },
775 { 0x00DD, "Yacute" },
776 { 0xF7FD, "Yacutesmall" },
777 { 0x0176, "Ycircumflex" },
778 { 0x0178, "Ydieresis" },
779 { 0xF7FF, "Ydieresissmall" },
780 { 0x1EF2, "Ygrave" },
781 { 0xF779, "Ysmall" },
782 { 0x005A, "Z" },
783 { 0x0179, "Zacute" },
784 { 0x017D, "Zcaron" },
785 { 0xF6FF, "Zcaronsmall" },
786 { 0x017B, "Zdotaccent" },
787 { 0x0396, "Zeta" },
788 { 0xF77A, "Zsmall" },
789 { 0x0061, "a" },
790 { 0x00E1, "aacute" },
791 { 0x0103, "abreve" },
792 { 0x00E2, "acircumflex" },
793 { 0x00B4, "acute" },
794 { 0x0301, "acutecomb" },
795 { 0x00E4, "adieresis" },
796 { 0x00E6, "ae" },
797 { 0x01FD, "aeacute" },
798 { 0x2015, "afii00208" },
799 { 0x0410, "afii10017" },
800 { 0x0411, "afii10018" },
801 { 0x0412, "afii10019" },
802 { 0x0413, "afii10020" },
803 { 0x0414, "afii10021" },
804 { 0x0415, "afii10022" },
805 { 0x0401, "afii10023" },
806 { 0x0416, "afii10024" },
807 { 0x0417, "afii10025" },
808 { 0x0418, "afii10026" },
809 { 0x0419, "afii10027" },
810 { 0x041A, "afii10028" },
811 { 0x041B, "afii10029" },
812 { 0x041C, "afii10030" },
813 { 0x041D, "afii10031" },
814 { 0x041E, "afii10032" },
815 { 0x041F, "afii10033" },
816 { 0x0420, "afii10034" },
817 { 0x0421, "afii10035" },
818 { 0x0422, "afii10036" },
819 { 0x0423, "afii10037" },
820 { 0x0424, "afii10038" },
821 { 0x0425, "afii10039" },
822 { 0x0426, "afii10040" },
823 { 0x0427, "afii10041" },
824 { 0x0428, "afii10042" },
825 { 0x0429, "afii10043" },
826 { 0x042A, "afii10044" },
827 { 0x042B, "afii10045" },
828 { 0x042C, "afii10046" },
829 { 0x042D, "afii10047" },
830 { 0x042E, "afii10048" },
831 { 0x042F, "afii10049" },
832 { 0x0490, "afii10050" },
833 { 0x0402, "afii10051" },
834 { 0x0403, "afii10052" },
835 { 0x0404, "afii10053" },
836 { 0x0405, "afii10054" },
837 { 0x0406, "afii10055" },
838 { 0x0407, "afii10056" },
839 { 0x0408, "afii10057" },
840 { 0x0409, "afii10058" },
841 { 0x040A, "afii10059" },
842 { 0x040B, "afii10060" },
843 { 0x040C, "afii10061" },
844 { 0x040E, "afii10062" },
845 { 0xF6C4, "afii10063" },
846 { 0xF6C5, "afii10064" },
847 { 0x0430, "afii10065" },
848 { 0x0431, "afii10066" },
849 { 0x0432, "afii10067" },
850 { 0x0433, "afii10068" },
851 { 0x0434, "afii10069" },
852 { 0x0435, "afii10070" },
853 { 0x0451, "afii10071" },
854 { 0x0436, "afii10072" },
855 { 0x0437, "afii10073" },
856 { 0x0438, "afii10074" },
857 { 0x0439, "afii10075" },
858 { 0x043A, "afii10076" },
859 { 0x043B, "afii10077" },
860 { 0x043C, "afii10078" },
861 { 0x043D, "afii10079" },
862 { 0x043E, "afii10080" },
863 { 0x043F, "afii10081" },
864 { 0x0440, "afii10082" },
865 { 0x0441, "afii10083" },
866 { 0x0442, "afii10084" },
867 { 0x0443, "afii10085" },
868 { 0x0444, "afii10086" },
869 { 0x0445, "afii10087" },
870 { 0x0446, "afii10088" },
871 { 0x0447, "afii10089" },
872 { 0x0448, "afii10090" },
873 { 0x0449, "afii10091" },
874 { 0x044A, "afii10092" },
875 { 0x044B, "afii10093" },
876 { 0x044C, "afii10094" },
877 { 0x044D, "afii10095" },
878 { 0x044E, "afii10096" },
879 { 0x044F, "afii10097" },
880 { 0x0491, "afii10098" },
881 { 0x0452, "afii10099" },
882 { 0x0453, "afii10100" },
883 { 0x0454, "afii10101" },
884 { 0x0455, "afii10102" },
885 { 0x0456, "afii10103" },
886 { 0x0457, "afii10104" },
887 { 0x0458, "afii10105" },
888 { 0x0459, "afii10106" },
889 { 0x045A, "afii10107" },
890 { 0x045B, "afii10108" },
891 { 0x045C, "afii10109" },
892 { 0x045E, "afii10110" },
893 { 0x040F, "afii10145" },
894 { 0x0462, "afii10146" },
895 { 0x0472, "afii10147" },
896 { 0x0474, "afii10148" },
897 { 0xF6C6, "afii10192" },
898 { 0x045F, "afii10193" },
899 { 0x0463, "afii10194" },
900 { 0x0473, "afii10195" },
901 { 0x0475, "afii10196" },
902 { 0xF6C7, "afii10831" },
903 { 0xF6C8, "afii10832" },
904 { 0x04D9, "afii10846" },
905 { 0x200E, "afii299" },
906 { 0x200F, "afii300" },
907 { 0x200D, "afii301" },
908 { 0x066A, "afii57381" },
909 { 0x060C, "afii57388" },
910 { 0x0660, "afii57392" },
911 { 0x0661, "afii57393" },
912 { 0x0662, "afii57394" },
913 { 0x0663, "afii57395" },
914 { 0x0664, "afii57396" },
915 { 0x0665, "afii57397" },
916 { 0x0666, "afii57398" },
917 { 0x0667, "afii57399" },
918 { 0x0668, "afii57400" },
919 { 0x0669, "afii57401" },
920 { 0x061B, "afii57403" },
921 { 0x061F, "afii57407" },
922 { 0x0621, "afii57409" },
923 { 0x0622, "afii57410" },
924 { 0x0623, "afii57411" },
925 { 0x0624, "afii57412" },
926 { 0x0625, "afii57413" },
927 { 0x0626, "afii57414" },
928 { 0x0627, "afii57415" },
929 { 0x0628, "afii57416" },
930 { 0x0629, "afii57417" },
931 { 0x062A, "afii57418" },
932 { 0x062B, "afii57419" },
933 { 0x062C, "afii57420" },
934 { 0x062D, "afii57421" },
935 { 0x062E, "afii57422" },
936 { 0x062F, "afii57423" },
937 { 0x0630, "afii57424" },
938 { 0x0631, "afii57425" },
939 { 0x0632, "afii57426" },
940 { 0x0633, "afii57427" },
941 { 0x0634, "afii57428" },
942 { 0x0635, "afii57429" },
943 { 0x0636, "afii57430" },
944 { 0x0637, "afii57431" },
945 { 0x0638, "afii57432" },
946 { 0x0639, "afii57433" },
947 { 0x063A, "afii57434" },
948 { 0x0640, "afii57440" },
949 { 0x0641, "afii57441" },
950 { 0x0642, "afii57442" },
951 { 0x0643, "afii57443" },
952 { 0x0644, "afii57444" },
953 { 0x0645, "afii57445" },
954 { 0x0646, "afii57446" },
955 { 0x0648, "afii57448" },
956 { 0x0649, "afii57449" },
957 { 0x064A, "afii57450" },
958 { 0x064B, "afii57451" },
959 { 0x064C, "afii57452" },
960 { 0x064D, "afii57453" },
961 { 0x064E, "afii57454" },
962 { 0x064F, "afii57455" },
963 { 0x0650, "afii57456" },
964 { 0x0651, "afii57457" },
965 { 0x0652, "afii57458" },
966 { 0x0647, "afii57470" },
967 { 0x06A4, "afii57505" },
968 { 0x067E, "afii57506" },
969 { 0x0686, "afii57507" },
970 { 0x0698, "afii57508" },
971 { 0x06AF, "afii57509" },
972 { 0x0679, "afii57511" },
973 { 0x0688, "afii57512" },
974 { 0x0691, "afii57513" },
975 { 0x06BA, "afii57514" },
976 { 0x06D2, "afii57519" },
977 { 0x06D5, "afii57534" },
978 { 0x20AA, "afii57636" },
979 { 0x05BE, "afii57645" },
980 { 0x05C3, "afii57658" },
981 { 0x05D0, "afii57664" },
982 { 0x05D1, "afii57665" },
983 { 0x05D2, "afii57666" },
984 { 0x05D3, "afii57667" },
985 { 0x05D4, "afii57668" },
986 { 0x05D5, "afii57669" },
987 { 0x05D6, "afii57670" },
988 { 0x05D7, "afii57671" },
989 { 0x05D8, "afii57672" },
990 { 0x05D9, "afii57673" },
991 { 0x05DA, "afii57674" },
992 { 0x05DB, "afii57675" },
993 { 0x05DC, "afii57676" },
994 { 0x05DD, "afii57677" },
995 { 0x05DE, "afii57678" },
996 { 0x05DF, "afii57679" },
997 { 0x05E0, "afii57680" },
998 { 0x05E1, "afii57681" },
999 { 0x05E2, "afii57682" },
1000 { 0x05E3, "afii57683" },
1001 { 0x05E4, "afii57684" },
1002 { 0x05E5, "afii57685" },
1003 { 0x05E6, "afii57686" },
1004 { 0x05E7, "afii57687" },
1005 { 0x05E8, "afii57688" },
1006 { 0x05E9, "afii57689" },
1007 { 0x05EA, "afii57690" },
1008 { 0xFB2A, "afii57694" },
1009 { 0xFB2B, "afii57695" },
1010 { 0xFB4B, "afii57700" },
1011 { 0xFB1F, "afii57705" },
1012 { 0x05F0, "afii57716" },
1013 { 0x05F1, "afii57717" },
1014 { 0x05F2, "afii57718" },
1015 { 0xFB35, "afii57723" },
1016 { 0x05B4, "afii57793" },
1017 { 0x05B5, "afii57794" },
1018 { 0x05B6, "afii57795" },
1019 { 0x05BB, "afii57796" },
1020 { 0x05B8, "afii57797" },
1021 { 0x05B7, "afii57798" },
1022 { 0x05B0, "afii57799" },
1023 { 0x05B2, "afii57800" },
1024 { 0x05B1, "afii57801" },
1025 { 0x05B3, "afii57802" },
1026 { 0x05C2, "afii57803" },
1027 { 0x05C1, "afii57804" },
1028 { 0x05B9, "afii57806" },
1029 { 0x05BC, "afii57807" },
1030 { 0x05BD, "afii57839" },
1031 { 0x05BF, "afii57841" },
1032 { 0x05C0, "afii57842" },
1033 { 0x02BC, "afii57929" },
1034 { 0x2105, "afii61248" },
1035 { 0x2113, "afii61289" },
1036 { 0x2116, "afii61352" },
1037 { 0x202C, "afii61573" },
1038 { 0x202D, "afii61574" },
1039 { 0x202E, "afii61575" },
1040 { 0x200C, "afii61664" },
1041 { 0x066D, "afii63167" },
1042 { 0x02BD, "afii64937" },
1043 { 0x00E0, "agrave" },
1044 { 0x2135, "aleph" },
1045 { 0x03B1, "alpha" },
1046 { 0x03AC, "alphatonos" },
1047 { 0x0101, "amacron" },
1048 { 0x0026, "ampersand" },
1049 { 0xF726, "ampersandsmall" },
1050 { 0x2220, "angle" },
1051 { 0x2329, "angleleft" },
1052 { 0x232A, "angleright" },
1053 { 0x0387, "anoteleia" },
1054 { 0x0105, "aogonek" },
1055 { 0x2248, "approxequal" },
1056 { 0x00E5, "aring" },
1057 { 0x01FB, "aringacute" },
1058 { 0x2194, "arrowboth" },
1059 { 0x21D4, "arrowdblboth" },
1060 { 0x21D3, "arrowdbldown" },
1061 { 0x21D0, "arrowdblleft" },
1062 { 0x21D2, "arrowdblright" },
1063 { 0x21D1, "arrowdblup" },
1064 { 0x2193, "arrowdown" },
1065 { 0xF8E7, "arrowhorizex" },
1066 { 0x2190, "arrowleft" },
1067 { 0x2192, "arrowright" },
1068 { 0x2191, "arrowup" },
1069 { 0x2195, "arrowupdn" },
1070 { 0x21A8, "arrowupdnbse" },
1071 { 0xF8E6, "arrowvertex" },
1072 { 0x005E, "asciicircum" },
1073 { 0x007E, "asciitilde" },
1074 { 0x002A, "asterisk" },
1075 { 0x2217, "asteriskmath" },
1076 { 0xF6E9, "asuperior" },
1077 { 0x0040, "at" },
1078 { 0x00E3, "atilde" },
1079 { 0x0062, "b" },
1080 { 0x005C, "backslash" },
1081 { 0x007C, "bar" },
1082 { 0x03B2, "beta" },
1083 { 0x2588, "block" },
1084 { 0xF8F4, "braceex" },
1085 { 0x007B, "braceleft" },
1086 { 0xF8F3, "braceleftbt" },
1087 { 0xF8F2, "braceleftmid" },
1088 { 0xF8F1, "bracelefttp" },
1089 { 0x007D, "braceright" },
1090 { 0xF8FE, "bracerightbt" },
1091 { 0xF8FD, "bracerightmid" },
1092 { 0xF8FC, "bracerighttp" },
1093 { 0x005B, "bracketleft" },
1094 { 0xF8F0, "bracketleftbt" },
1095 { 0xF8EF, "bracketleftex" },
1096 { 0xF8EE, "bracketlefttp" },
1097 { 0x005D, "bracketright" },
1098 { 0xF8FB, "bracketrightbt" },
1099 { 0xF8FA, "bracketrightex" },
1100 { 0xF8F9, "bracketrighttp" },
1101 { 0x02D8, "breve" },
1102 { 0x00A6, "brokenbar" },
1103 { 0xF6EA, "bsuperior" },
1104 { 0x2022, "bullet" },
1105 { 0x0063, "c" },
1106 { 0x0107, "cacute" },
1107 { 0x02C7, "caron" },
1108 { 0x21B5, "carriagereturn" },
1109 { 0x010D, "ccaron" },
1110 { 0x00E7, "ccedilla" },
1111 { 0x0109, "ccircumflex" },
1112 { 0x010B, "cdotaccent" },
1113 { 0x00B8, "cedilla" },
1114 { 0x00A2, "cent" },
1115 { 0xF6DF, "centinferior" },
1116 { 0xF7A2, "centoldstyle" },
1117 { 0xF6E0, "centsuperior" },
1118 { 0x03C7, "chi" },
1119 { 0x25CB, "circle" },
1120 { 0x2297, "circlemultiply" },
1121 { 0x2295, "circleplus" },
1122 { 0x02C6, "circumflex" },
1123 { 0x2663, "club" },
1124 { 0x003A, "colon" },
1125 { 0x20A1, "colonmonetary" },
1126 { 0x002C, "comma" },
1127 { 0xF6C3, "commaaccent" },
1128 { 0xF6E1, "commainferior" },
1129 { 0xF6E2, "commasuperior" },
1130 { 0x2245, "congruent" },
1131 { 0x00A9, "copyright" },
1132 { 0xF8E9, "copyrightsans" },
1133 { 0xF6D9, "copyrightserif" },
1134 { 0x00A4, "currency" },
1135 { 0xF6D1, "cyrBreve" },
1136 { 0xF6D2, "cyrFlex" },
1137 { 0xF6D4, "cyrbreve" },
1138 { 0xF6D5, "cyrflex" },
1139 { 0x0064, "d" },
1140 { 0x2020, "dagger" },
1141 { 0x2021, "daggerdbl" },
1142 { 0xF6D3, "dblGrave" },
1143 { 0xF6D6, "dblgrave" },
1144 { 0x010F, "dcaron" },
1145 { 0x0111, "dcroat" },
1146 { 0x00B0, "degree" },
1147 { 0x03B4, "delta" },
1148 { 0x2666, "diamond" },
1149 { 0x00A8, "dieresis" },
1150 { 0xF6D7, "dieresisacute" },
1151 { 0xF6D8, "dieresisgrave" },
1152 { 0x0385, "dieresistonos" },
1153 { 0x00F7, "divide" },
1154 { 0x2593, "dkshade" },
1155 { 0x2584, "dnblock" },
1156 { 0x0024, "dollar" },
1157 { 0xF6E3, "dollarinferior" },
1158 { 0xF724, "dollaroldstyle" },
1159 { 0xF6E4, "dollarsuperior" },
1160 { 0x20AB, "dong" },
1161 { 0x02D9, "dotaccent" },
1162 { 0x0323, "dotbelowcomb" },
1163 { 0x0131, "dotlessi" },
1164 { 0xF6BE, "dotlessj" },
1165 { 0x22C5, "dotmath" },
1166 { 0xF6EB, "dsuperior" },
1167 { 0x0065, "e" },
1168 { 0x00E9, "eacute" },
1169 { 0x0115, "ebreve" },
1170 { 0x011B, "ecaron" },
1171 { 0x00EA, "ecircumflex" },
1172 { 0x00EB, "edieresis" },
1173 { 0x0117, "edotaccent" },
1174 { 0x00E8, "egrave" },
1175 { 0x0038, "eight" },
1176 { 0x2088, "eightinferior" },
1177 { 0xF738, "eightoldstyle" },
1178 { 0x2078, "eightsuperior" },
1179 { 0x2208, "element" },
1180 { 0x2026, "ellipsis" },
1181 { 0x0113, "emacron" },
1182 { 0x2014, "emdash" },
1183 { 0x2205, "emptyset" },
1184 { 0x2013, "endash" },
1185 { 0x014B, "eng" },
1186 { 0x0119, "eogonek" },
1187 { 0x03B5, "epsilon" },
1188 { 0x03AD, "epsilontonos" },
1189 { 0x003D, "equal" },
1190 { 0x2261, "equivalence" },
1191 { 0x212E, "estimated" },
1192 { 0xF6EC, "esuperior" },
1193 { 0x03B7, "eta" },
1194 { 0x03AE, "etatonos" },
1195 { 0x00F0, "eth" },
1196 { 0x0021, "exclam" },
1197 { 0x203C, "exclamdbl" },
1198 { 0x00A1, "exclamdown" },
1199 { 0xF7A1, "exclamdownsmall" },
1200 { 0xF721, "exclamsmall" },
1201 { 0x2203, "existential" },
1202 { 0x0066, "f" },
1203 { 0x2640, "female" },
1204 { 0xFB00, "ff" },
1205 { 0xFB03, "ffi" },
1206 { 0xFB04, "ffl" },
1207 { 0xFB01, "fi" },
1208 { 0x2012, "figuredash" },
1209 { 0x25A0, "filledbox" },
1210 { 0x25AC, "filledrect" },
1211 { 0x0035, "five" },
1212 { 0x215D, "fiveeighths" },
1213 { 0x2085, "fiveinferior" },
1214 { 0xF735, "fiveoldstyle" },
1215 { 0x2075, "fivesuperior" },
1216 { 0xFB02, "fl" },
1217 { 0x0192, "florin" },
1218 { 0x0034, "four" },
1219 { 0x2084, "fourinferior" },
1220 { 0xF734, "fouroldstyle" },
1221 { 0x2074, "foursuperior" },
1222 { 0x2044, "fraction" },
1223 { 0x2215, "fraction" },
1224 { 0x20A3, "franc" },
1225 { 0x0067, "g" },
1226 { 0x03B3, "gamma" },
1227 { 0x011F, "gbreve" },
1228 { 0x01E7, "gcaron" },
1229 { 0x011D, "gcircumflex" },
1230 { 0x0123, "gcommaaccent" },
1231 { 0x0121, "gdotaccent" },
1232 { 0x00DF, "germandbls" },
1233 { 0x2207, "gradient" },
1234 { 0x0060, "grave" },
1235 { 0x0300, "gravecomb" },
1236 { 0x003E, "greater" },
1237 { 0x2265, "greaterequal" },
1238 { 0x00AB, "guillemotleft" },
1239 { 0x00BB, "guillemotright" },
1240 { 0x2039, "guilsinglleft" },
1241 { 0x203A, "guilsinglright" },
1242 { 0x0068, "h" },
1243 { 0x0127, "hbar" },
1244 { 0x0125, "hcircumflex" },
1245 { 0x2665, "heart" },
1246 { 0x0309, "hookabovecomb" },
1247 { 0x2302, "house" },
1248 { 0x02DD, "hungarumlaut" },
1249 { 0x002D, "hyphen" },
1250 { 0x00AD, "hyphen" },
1251 { 0xF6E5, "hypheninferior" },
1252 { 0xF6E6, "hyphensuperior" },
1253 { 0x0069, "i" },
1254 { 0x00ED, "iacute" },
1255 { 0x012D, "ibreve" },
1256 { 0x00EE, "icircumflex" },
1257 { 0x00EF, "idieresis" },
1258 { 0x00EC, "igrave" },
1259 { 0x0133, "ij" },
1260 { 0x012B, "imacron" },
1261 { 0x221E, "infinity" },
1262 { 0x222B, "integral" },
1263 { 0x2321, "integralbt" },
1264 { 0xF8F5, "integralex" },
1265 { 0x2320, "integraltp" },
1266 { 0x2229, "intersection" },
1267 { 0x25D8, "invbullet" },
1268 { 0x25D9, "invcircle" },
1269 { 0x263B, "invsmileface" },
1270 { 0x012F, "iogonek" },
1271 { 0x03B9, "iota" },
1272 { 0x03CA, "iotadieresis" },
1273 { 0x0390, "iotadieresistonos" },
1274 { 0x03AF, "iotatonos" },
1275 { 0xF6ED, "isuperior" },
1276 { 0x0129, "itilde" },
1277 { 0x006A, "j" },
1278 { 0x0135, "jcircumflex" },
1279 { 0x006B, "k" },
1280 { 0x03BA, "kappa" },
1281 { 0x0137, "kcommaaccent" },
1282 { 0x0138, "kgreenlandic" },
1283 { 0x006C, "l" },
1284 { 0x013A, "lacute" },
1285 { 0x03BB, "lambda" },
1286 { 0x013E, "lcaron" },
1287 { 0x013C, "lcommaaccent" },
1288 { 0x0140, "ldot" },
1289 { 0x003C, "less" },
1290 { 0x2264, "lessequal" },
1291 { 0x258C, "lfblock" },
1292 { 0x20A4, "lira" },
1293 { 0xF6C0, "ll" },
1294 { 0x2227, "logicaland" },
1295 { 0x00AC, "logicalnot" },
1296 { 0x2228, "logicalor" },
1297 { 0x017F, "longs" },
1298 { 0x25CA, "lozenge" },
1299 { 0x0142, "lslash" },
1300 { 0xF6EE, "lsuperior" },
1301 { 0x2591, "ltshade" },
1302 { 0x006D, "m" },
1303 { 0x00AF, "macron" },
1304 { 0x02C9, "macron" },
1305 { 0x2642, "male" },
1306 { 0x2212, "minus" },
1307 { 0x2032, "minute" },
1308 { 0xF6EF, "msuperior" },
1309 { 0x00B5, "mu" },
1310 { 0x03BC, "mu" },
1311 { 0x00D7, "multiply" },
1312 { 0x266A, "musicalnote" },
1313 { 0x266B, "musicalnotedbl" },
1314 { 0x006E, "n" },
1315 { 0x0144, "nacute" },
1316 { 0x0149, "napostrophe" },
1317 { 0x0148, "ncaron" },
1318 { 0x0146, "ncommaaccent" },
1319 { 0x0039, "nine" },
1320 { 0x2089, "nineinferior" },
1321 { 0xF739, "nineoldstyle" },
1322 { 0x2079, "ninesuperior" },
1323 { 0x2209, "notelement" },
1324 { 0x2260, "notequal" },
1325 { 0x2284, "notsubset" },
1326 { 0x207F, "nsuperior" },
1327 { 0x00F1, "ntilde" },
1328 { 0x03BD, "nu" },
1329 { 0x0023, "numbersign" },
1330 { 0x006F, "o" },
1331 { 0x00F3, "oacute" },
1332 { 0x014F, "obreve" },
1333 { 0x00F4, "ocircumflex" },
1334 { 0x00F6, "odieresis" },
1335 { 0x0153, "oe" },
1336 { 0x02DB, "ogonek" },
1337 { 0x00F2, "ograve" },
1338 { 0x01A1, "ohorn" },
1339 { 0x0151, "ohungarumlaut" },
1340 { 0x014D, "omacron" },
1341 { 0x03C9, "omega" },
1342 { 0x03D6, "omega1" },
1343 { 0x03CE, "omegatonos" },
1344 { 0x03BF, "omicron" },
1345 { 0x03CC, "omicrontonos" },
1346 { 0x0031, "one" },
1347 { 0x2024, "onedotenleader" },
1348 { 0x215B, "oneeighth" },
1349 { 0xF6DC, "onefitted" },
1350 { 0x00BD, "onehalf" },
1351 { 0x2081, "oneinferior" },
1352 { 0xF731, "oneoldstyle" },
1353 { 0x00BC, "onequarter" },
1354 { 0x00B9, "onesuperior" },
1355 { 0x2153, "onethird" },
1356 { 0x25E6, "openbullet" },
1357 { 0x00AA, "ordfeminine" },
1358 { 0x00BA, "ordmasculine" },
1359 { 0x221F, "orthogonal" },
1360 { 0x00F8, "oslash" },
1361 { 0x01FF, "oslashacute" },
1362 { 0xF6F0, "osuperior" },
1363 { 0x00F5, "otilde" },
1364 { 0x0070, "p" },
1365 { 0x00B6, "paragraph" },
1366 { 0x0028, "parenleft" },
1367 { 0xF8ED, "parenleftbt" },
1368 { 0xF8EC, "parenleftex" },
1369 { 0x208D, "parenleftinferior" },
1370 { 0x207D, "parenleftsuperior" },
1371 { 0xF8EB, "parenlefttp" },
1372 { 0x0029, "parenright" },
1373 { 0xF8F8, "parenrightbt" },
1374 { 0xF8F7, "parenrightex" },
1375 { 0x208E, "parenrightinferior" },
1376 { 0x207E, "parenrightsuperior" },
1377 { 0xF8F6, "parenrighttp" },
1378 { 0x2202, "partialdiff" },
1379 { 0x0025, "percent" },
1380 { 0x002E, "period" },
1381 { 0x00B7, "periodcentered" },
1382 { 0x2219, "periodcentered" },
1383 { 0xF6E7, "periodinferior" },
1384 { 0xF6E8, "periodsuperior" },
1385 { 0x22A5, "perpendicular" },
1386 { 0x2030, "perthousand" },
1387 { 0x20A7, "peseta" },
1388 { 0x03C6, "phi" },
1389 { 0x03D5, "phi1" },
1390 { 0x03C0, "pi" },
1391 { 0x002B, "plus" },
1392 { 0x00B1, "plusminus" },
1393 { 0x211E, "prescription" },
1394 { 0x220F, "product" },
1395 { 0x2282, "propersubset" },
1396 { 0x2283, "propersuperset" },
1397 { 0x221D, "proportional" },
1398 { 0x03C8, "psi" },
1399 { 0x0071, "q" },
1400 { 0x003F, "question" },
1401 { 0x00BF, "questiondown" },
1402 { 0xF7BF, "questiondownsmall" },
1403 { 0xF73F, "questionsmall" },
1404 { 0x0022, "quotedbl" },
1405 { 0x201E, "quotedblbase" },
1406 { 0x201C, "quotedblleft" },
1407 { 0x201D, "quotedblright" },
1408 { 0x2018, "quoteleft" },
1409 { 0x201B, "quotereversed" },
1410 { 0x2019, "quoteright" },
1411 { 0x201A, "quotesinglbase" },
1412 { 0x0027, "quotesingle" },
1413 { 0x0072, "r" },
1414 { 0x0155, "racute" },
1415 { 0x221A, "radical" },
1416 { 0xF8E5, "radicalex" },
1417 { 0x0159, "rcaron" },
1418 { 0x0157, "rcommaaccent" },
1419 { 0x2286, "reflexsubset" },
1420 { 0x2287, "reflexsuperset" },
1421 { 0x00AE, "registered" },
1422 { 0xF8E8, "registersans" },
1423 { 0xF6DA, "registerserif" },
1424 { 0x2310, "revlogicalnot" },
1425 { 0x03C1, "rho" },
1426 { 0x02DA, "ring" },
1427 { 0xF6F1, "rsuperior" },
1428 { 0x2590, "rtblock" },
1429 { 0xF6DD, "rupiah" },
1430 { 0x0073, "s" },
1431 { 0x015B, "sacute" },
1432 { 0x0161, "scaron" },
1433 { 0x015F, "scedilla" },
1434 { 0xF6C2, "scedilla" },
1435 { 0x015D, "scircumflex" },
1436 { 0x0219, "scommaaccent" },
1437 { 0x2033, "second" },
1438 { 0x00A7, "section" },
1439 { 0x003B, "semicolon" },
1440 { 0x0037, "seven" },
1441 { 0x215E, "seveneighths" },
1442 { 0x2087, "seveninferior" },
1443 { 0xF737, "sevenoldstyle" },
1444 { 0x2077, "sevensuperior" },
1445 { 0x2592, "shade" },
1446 { 0x03C3, "sigma" },
1447 { 0x03C2, "sigma1" },
1448 { 0x223C, "similar" },
1449 { 0x0036, "six" },
1450 { 0x2086, "sixinferior" },
1451 { 0xF736, "sixoldstyle" },
1452 { 0x2076, "sixsuperior" },
1453 { 0x002F, "slash" },
1454 { 0x263A, "smileface" },
1455 { 0x0020, "space" },
1456 { 0x00A0, "space" },
1457 { 0x2660, "spade" },
1458 { 0xF6F2, "ssuperior" },
1459 { 0x00A3, "sterling" },
1460 { 0x220B, "suchthat" },
1461 { 0x2211, "summation" },
1462 { 0x263C, "sun" },
1463 { 0x0074, "t" },
1464 { 0x03C4, "tau" },
1465 { 0x0167, "tbar" },
1466 { 0x0165, "tcaron" },
1467 { 0x0163, "tcommaaccent" },
1468 { 0x021B, "tcommaaccent" },
1469 { 0x2234, "therefore" },
1470 { 0x03B8, "theta" },
1471 { 0x03D1, "theta1" },
1472 { 0x00FE, "thorn" },
1473 { 0x0033, "three" },
1474 { 0x215C, "threeeighths" },
1475 { 0x2083, "threeinferior" },
1476 { 0xF733, "threeoldstyle" },
1477 { 0x00BE, "threequarters" },
1478 { 0xF6DE, "threequartersemdash" },
1479 { 0x00B3, "threesuperior" },
1480 { 0x02DC, "tilde" },
1481 { 0x0303, "tildecomb" },
1482 { 0x0384, "tonos" },
1483 { 0x2122, "trademark" },
1484 { 0xF8EA, "trademarksans" },
1485 { 0xF6DB, "trademarkserif" },
1486 { 0x25BC, "triagdn" },
1487 { 0x25C4, "triaglf" },
1488 { 0x25BA, "triagrt" },
1489 { 0x25B2, "triagup" },
1490 { 0xF6F3, "tsuperior" },
1491 { 0x0032, "two" },
1492 { 0x2025, "twodotenleader" },
1493 { 0x2082, "twoinferior" },
1494 { 0xF732, "twooldstyle" },
1495 { 0x00B2, "twosuperior" },
1496 { 0x2154, "twothirds" },
1497 { 0x0075, "u" },
1498 { 0x00FA, "uacute" },
1499 { 0x016D, "ubreve" },
1500 { 0x00FB, "ucircumflex" },
1501 { 0x00FC, "udieresis" },
1502 { 0x00F9, "ugrave" },
1503 { 0x01B0, "uhorn" },
1504 { 0x0171, "uhungarumlaut" },
1505 { 0x016B, "umacron" },
1506 { 0x005F, "underscore" },
1507 { 0x2017, "underscoredbl" },
1508 { 0x222A, "union" },
1509 { 0x2200, "universal" },
1510 { 0x0173, "uogonek" },
1511 { 0x2580, "upblock" },
1512 { 0x03C5, "upsilon" },
1513 { 0x03CB, "upsilondieresis" },
1514 { 0x03B0, "upsilondieresistonos" },
1515 { 0x03CD, "upsilontonos" },
1516 { 0x016F, "uring" },
1517 { 0x0169, "utilde" },
1518 { 0x0076, "v" },
1519 { 0x0077, "w" },
1520 { 0x1E83, "wacute" },
1521 { 0x0175, "wcircumflex" },
1522 { 0x1E85, "wdieresis" },
1523 { 0x2118, "weierstrass" },
1524 { 0x1E81, "wgrave" },
1525 { 0x0078, "x" },
1526 { 0x03BE, "xi" },
1527 { 0x0079, "y" },
1528 { 0x00FD, "yacute" },
1529 { 0x0177, "ycircumflex" },
1530 { 0x00FF, "ydieresis" },
1531 { 0x00A5, "yen" },
1532 { 0x1EF3, "ygrave" },
1533 { 0x007A, "z" },
1534 { 0x017A, "zacute" },
1535 { 0x017E, "zcaron" },
1536 { 0x017C, "zdotaccent" },
1537 { 0x0030, "zero" },
1538 { 0x2080, "zeroinferior" },
1539 { 0xF730, "zerooldstyle" },
1540 { 0x2070, "zerosuperior" },
1541 { 0x03B6, "zeta" }
1543 #define unitabs (sizeof (unitab) / sizeof (unitab[0]))
1547 * fixme: We should really use integer table for dingbats
1548 * (???)
1551 static GPPSUniTab dingtab[] = {
1552 { 0x0020, "space" }, /* SPACE */
1553 { 0x2701, "a1" }, /* UPPER BLADE SCISSORS */
1554 { 0x2702, "a2" }, /* BLACK SCISSORS */
1555 { 0x2703, "a202" }, /* LOWER BLADE SCISSORS */
1556 { 0x2704, "a3" }, /* WHITE SCISSORS */
1557 { 0x260E, "a4" }, /* BLACK TELEPHONE */
1558 { 0x2706, "a5" }, /* TELEPHONE LOCATION SIGN */
1559 { 0x2707, "a119" }, /* TAPE DRIVE */
1560 { 0x2708, "a118" }, /* AIRPLANE */
1561 { 0x2709, "a117" }, /* ENVELOPE */
1562 { 0x261B, "a11" }, /* BLACK RIGHT POINTING INDEX */
1563 { 0x261E, "a12" }, /* WHITE RIGHT POINTING INDEX */
1564 { 0x270C, "a13" }, /* VICTORY HAND */
1565 { 0x270D, "a14" }, /* WRITING HAND */
1566 { 0x270E, "a15" }, /* LOWER RIGHT PENCIL */
1567 { 0x270F, "a16" }, /* PENCIL */
1568 { 0x2710, "a105" }, /* UPPER RIGHT PENCIL */
1569 { 0x2711, "a17" }, /* WHITE NIB */
1570 { 0x2712, "a18" }, /* BLACK NIB */
1571 { 0x2713, "a19" }, /* CHECK MARK */
1572 { 0x2714, "a20" }, /* HEAVY CHECK MARK */
1573 { 0x2715, "a21" }, /* MULTIPLICATION X */
1574 { 0x2716, "a22" }, /* HEAVY MULTIPLICATION X */
1575 { 0x2717, "a23" }, /* BALLOT X */
1576 { 0x2718, "a24" }, /* HEAVY BALLOT X */
1577 { 0x2719, "a25" }, /* OUTLINED GREEK CROSS */
1578 { 0x271A, "a26" }, /* HEAVY GREEK CROSS */
1579 { 0x271B, "a27" }, /* OPEN CENTRE CROSS */
1580 { 0x271C, "a28" }, /* HEAVY OPEN CENTRE CROSS */
1581 { 0x271D, "a6" }, /* LATIN CROSS */
1582 { 0x271E, "a7" }, /* SHADOWED WHITE LATIN CROSS */
1583 { 0x271F, "a8" }, /* OUTLINED LATIN CROSS */
1584 { 0x2720, "a9" }, /* MALTESE CROSS */
1585 { 0x2721, "a10" }, /* STAR OF DAVID */
1586 { 0x2722, "a29" }, /* FOUR TEARDROP-SPOKED ASTERISK */
1587 { 0x2723, "a30" }, /* FOUR BALLOON-SPOKED ASTERISK */
1588 { 0x2724, "a31" }, /* HEAVY FOUR BALLOON-SPOKED ASTERISK */
1589 { 0x2725, "a32" }, /* FOUR CLUB-SPOKED ASTERISK */
1590 { 0x2726, "a33" }, /* BLACK FOUR POINTED STAR */
1591 { 0x2727, "a34" }, /* WHITE FOUR POINTED STAR */
1592 { 0x2605, "a35" }, /* BLACK STAR */
1593 { 0x2729, "a36" }, /* STRESS OUTLINED WHITE STAR */
1594 { 0x272A, "a37" }, /* CIRCLED WHITE STAR */
1595 { 0x272B, "a38" }, /* OPEN CENTRE BLACK STAR */
1596 { 0x272C, "a39" }, /* BLACK CENTRE WHITE STAR */
1597 { 0x272D, "a40" }, /* OUTLINED BLACK STAR */
1598 { 0x272E, "a41" }, /* HEAVY OUTLINED BLACK STAR */
1599 { 0x272F, "a42" }, /* PINWHEEL STAR */
1600 { 0x2730, "a43" }, /* SHADOWED WHITE STAR */
1601 { 0x2731, "a44" }, /* HEAVY ASTERISK */
1602 { 0x2732, "a45" }, /* OPEN CENTRE ASTERISK */
1603 { 0x2733, "a46" }, /* EIGHT SPOKED ASTERISK */
1604 { 0x2734, "a47" }, /* EIGHT POINTED BLACK STAR */
1605 { 0x2735, "a48" }, /* EIGHT POINTED PINWHEEL STAR */
1606 { 0x2736, "a49" }, /* SIX POINTED BLACK STAR */
1607 { 0x2737, "a50" }, /* EIGHT POINTED RECTILINEAR BLACK STAR */
1608 { 0x2738, "a51" }, /* HEAVY EIGHT POINTED RECTILINEAR BLACK STAR */
1609 { 0x2739, "a52" }, /* TWELVE POINTED BLACK STAR */
1610 { 0x273A, "a53" }, /* SIXTEEN POINTED ASTERISK */
1611 { 0x273B, "a54" }, /* TEARDROP-SPOKED ASTERISK */
1612 { 0x273C, "a55" }, /* OPEN CENTRE TEARDROP-SPOKED ASTERISK */
1613 { 0x273D, "a56" }, /* HEAVY TEARDROP-SPOKED ASTERISK */
1614 { 0x273E, "a57" }, /* SIX PETALLED BLACK AND WHITE FLORETTE */
1615 { 0x273F, "a58" }, /* BLACK FLORETTE */
1616 { 0x2740, "a59" }, /* WHITE FLORETTE */
1617 { 0x2741, "a60" }, /* EIGHT PETALLED OUTLINED BLACK FLORETTE */
1618 { 0x2742, "a61" }, /* CIRCLED OPEN CENTRE EIGHT POINTED STAR */
1619 { 0x2743, "a62" }, /* HEAVY TEARDROP-SPOKED PINWHEEL ASTERISK */
1620 { 0x2744, "a63" }, /* SNOWFLAKE */
1621 { 0x2745, "a64" }, /* TIGHT TRIFOLIATE SNOWFLAKE */
1622 { 0x2746, "a65" }, /* HEAVY CHEVRON SNOWFLAKE */
1623 { 0x2747, "a66" }, /* SPARKLE */
1624 { 0x2748, "a67" }, /* HEAVY SPARKLE */
1625 { 0x2749, "a68" }, /* BALLOON-SPOKED ASTERISK */
1626 { 0x274A, "a69" }, /* EIGHT TEARDROP-SPOKED PROPELLER ASTERISK */
1627 { 0x274B, "a70" }, /* HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK */
1628 { 0x25CF, "a71" }, /* BLACK CIRCLE */
1629 { 0x274D, "a72" }, /* SHADOWED WHITE CIRCLE */
1630 { 0x25A0, "a73" }, /* BLACK SQUARE */
1631 { 0x274F, "a74" }, /* LOWER RIGHT DROP-SHADOWED WHITE SQUARE */
1632 { 0x2750, "a203" }, /* UPPER RIGHT DROP-SHADOWED WHITE SQUARE */
1633 { 0x2751, "a75" }, /* LOWER RIGHT SHADOWED WHITE SQUARE */
1634 { 0x2752, "a204" }, /* UPPER RIGHT SHADOWED WHITE SQUARE */
1635 { 0x25B2, "a76" }, /* BLACK UP-POINTING TRIANGLE */
1636 { 0x25BC, "a77" }, /* BLACK DOWN-POINTING TRIANGLE */
1637 { 0x25C6, "a78" }, /* BLACK DIAMOND */
1638 { 0x2756, "a79" }, /* BLACK DIAMOND MINUS WHITE X */
1639 { 0x25D7, "a81" }, /* RIGHT HALF BLACK CIRCLE */
1640 { 0x2758, "a82" }, /* LIGHT VERTICAL BAR */
1641 { 0x2759, "a83" }, /* MEDIUM VERTICAL BAR */
1642 { 0x275A, "a84" }, /* HEAVY VERTICAL BAR */
1643 { 0x275B, "a97" }, /* HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT */
1644 { 0x275C, "a98" }, /* HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT */
1645 { 0x275D, "a99" }, /* HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT */
1646 { 0x275E, "a100" }, /* HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT */
1647 { 0xF8D7, "a89" }, /* MEDIUM LEFT PARENTHESIS ORNAMENT */
1648 { 0xF8D8, "a90" }, /* MEDIUM RIGHT PARENTHESIS ORNAMENT */
1649 { 0xF8D9, "a93" }, /* MEDIUM FLATTENED LEFT PARENTHESIS ORNAMENT */
1650 { 0xF8DA, "a94" }, /* MEDIUM FLATTENED RIGHT PARENTHESIS ORNAMENT */
1651 { 0xF8DB, "a91" }, /* MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT */
1652 { 0xF8DC, "a92" }, /* MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT */
1653 { 0xF8DD, "a205" }, /* HEAVY LEFT-POINTING ANGLE QUOTATION MARK ORNAMENT */
1654 { 0xF8DE, "a85" }, /* HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT */
1655 { 0xF8DF, "a206" }, /* HEAVY LEFT-POINTING ANGLE BRACKET ORNAMENT */
1656 { 0xF8E0, "a86" }, /* HEAVY RIGHT-POINTING ANGLE BRACKET ORNAMENT */
1657 { 0xF8E1, "a87" }, /* LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT */
1658 { 0xF8E2, "a88" }, /* LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT */
1659 { 0xF8E3, "a95" }, /* MEDIUM LEFT CURLY BRACKET ORNAMENT */
1660 { 0xF8E4, "a96" }, /* MEDIUM RIGHT CURLY BRACKET ORNAMENT */
1661 { 0x2761, "a101" }, /* CURVED STEM PARAGRAPH SIGN ORNAMENT */
1662 { 0x2762, "a102" }, /* HEAVY EXCLAMATION MARK ORNAMENT */
1663 { 0x2763, "a103" }, /* HEAVY HEART EXCLAMATION MARK ORNAMENT */
1664 { 0x2764, "a104" }, /* HEAVY BLACK HEART */
1665 { 0x2765, "a106" }, /* ROTATED HEAVY BLACK HEART BULLET */
1666 { 0x2766, "a107" }, /* FLORAL HEART */
1667 { 0x2767, "a108" }, /* ROTATED FLORAL HEART BULLET */
1668 { 0x2663, "a112" }, /* BLACK CLUB SUIT */
1669 { 0x2666, "a111" }, /* BLACK DIAMOND SUIT */
1670 { 0x2665, "a110" }, /* BLACK HEART SUIT */
1671 { 0x2660, "a109" }, /* BLACK SPADE SUIT */
1672 { 0x2460, "a120" }, /* CIRCLED DIGIT ONE */
1673 { 0x2461, "a121" }, /* CIRCLED DIGIT TWO */
1674 { 0x2462, "a122" }, /* CIRCLED DIGIT THREE */
1675 { 0x2463, "a123" }, /* CIRCLED DIGIT FOUR */
1676 { 0x2464, "a124" }, /* CIRCLED DIGIT FIVE */
1677 { 0x2465, "a125" }, /* CIRCLED DIGIT SIX */
1678 { 0x2466, "a126" }, /* CIRCLED DIGIT SEVEN */
1679 { 0x2467, "a127" }, /* CIRCLED DIGIT EIGHT */
1680 { 0x2468, "a128" }, /* CIRCLED DIGIT NINE */
1681 { 0x2469, "a129" }, /* CIRCLED NUMBER TEN */
1682 { 0x2776, "a130" }, /* DINGBAT NEGATIVE CIRCLED DIGIT ONE */
1683 { 0x2777, "a131" }, /* DINGBAT NEGATIVE CIRCLED DIGIT TWO */
1684 { 0x2778, "a132" }, /* DINGBAT NEGATIVE CIRCLED DIGIT THREE */
1685 { 0x2779, "a133" }, /* DINGBAT NEGATIVE CIRCLED DIGIT FOUR */
1686 { 0x277A, "a134" }, /* DINGBAT NEGATIVE CIRCLED DIGIT FIVE */
1687 { 0x277B, "a135" }, /* DINGBAT NEGATIVE CIRCLED DIGIT SIX */
1688 { 0x277C, "a136" }, /* DINGBAT NEGATIVE CIRCLED DIGIT SEVEN */
1689 { 0x277D, "a137" }, /* DINGBAT NEGATIVE CIRCLED DIGIT EIGHT */
1690 { 0x277E, "a138" }, /* DINGBAT NEGATIVE CIRCLED DIGIT NINE */
1691 { 0x277F, "a139" }, /* DINGBAT NEGATIVE CIRCLED NUMBER TEN */
1692 { 0x2780, "a140" }, /* DINGBAT CIRCLED SANS-SERIF DIGIT ONE */
1693 { 0x2781, "a141" }, /* DINGBAT CIRCLED SANS-SERIF DIGIT TWO */
1694 { 0x2782, "a142" }, /* DINGBAT CIRCLED SANS-SERIF DIGIT THREE */
1695 { 0x2783, "a143" }, /* DINGBAT CIRCLED SANS-SERIF DIGIT FOUR */
1696 { 0x2784, "a144" }, /* DINGBAT CIRCLED SANS-SERIF DIGIT FIVE */
1697 { 0x2785, "a145" }, /* DINGBAT CIRCLED SANS-SERIF DIGIT SIX */
1698 { 0x2786, "a146" }, /* DINGBAT CIRCLED SANS-SERIF DIGIT SEVEN */
1699 { 0x2787, "a147" }, /* DINGBAT CIRCLED SANS-SERIF DIGIT EIGHT */
1700 { 0x2788, "a148" }, /* DINGBAT CIRCLED SANS-SERIF DIGIT NINE */
1701 { 0x2789, "a149" }, /* DINGBAT CIRCLED SANS-SERIF NUMBER TEN */
1702 { 0x278A, "a150" }, /* DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE */
1703 { 0x278B, "a151" }, /* DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT TWO */
1704 { 0x278C, "a152" }, /* DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT THREE */
1705 { 0x278D, "a153" }, /* DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT FOUR */
1706 { 0x278E, "a154" }, /* DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT FIVE */
1707 { 0x278F, "a155" }, /* DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT SIX */
1708 { 0x2790, "a156" }, /* DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT SEVEN */
1709 { 0x2791, "a157" }, /* DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT EIGHT */
1710 { 0x2792, "a158" }, /* DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT NINE */
1711 { 0x2793, "a159" }, /* DINGBAT NEGATIVE CIRCLED SANS-SERIF NUMBER TEN */
1712 { 0x2794, "a160" }, /* HEAVY WIDE-HEADED RIGHTWARDS ARROW */
1713 { 0x2192, "a161" }, /* RIGHTWARDS ARROW */
1714 { 0x2194, "a163" }, /* LEFT RIGHT ARROW */
1715 { 0x2195, "a164" }, /* UP DOWN ARROW */
1716 { 0x2798, "a196" }, /* HEAVY SOUTH EAST ARROW */
1717 { 0x2799, "a165" }, /* HEAVY RIGHTWARDS ARROW */
1718 { 0x279A, "a192" }, /* HEAVY NORTH EAST ARROW */
1719 { 0x279B, "a166" }, /* DRAFTING POINT RIGHTWARDS ARROW */
1720 { 0x279C, "a167" }, /* HEAVY ROUND-TIPPED RIGHTWARDS ARROW */
1721 { 0x279D, "a168" }, /* TRIANGLE-HEADED RIGHTWARDS ARROW */
1722 { 0x279E, "a169" }, /* HEAVY TRIANGLE-HEADED RIGHTWARDS ARROW */
1723 { 0x279F, "a170" }, /* DASHED TRIANGLE-HEADED RIGHTWARDS ARROW */
1724 { 0x27A0, "a171" }, /* HEAVY DASHED TRIANGLE-HEADED RIGHTWARDS ARROW */
1725 { 0x27A1, "a172" }, /* BLACK RIGHTWARDS ARROW */
1726 { 0x27A2, "a173" }, /* THREE-D TOP-LIGHTED RIGHTWARDS ARROWHEAD */
1727 { 0x27A3, "a162" }, /* THREE-D BOTTOM-LIGHTED RIGHTWARDS ARROWHEAD */
1728 { 0x27A4, "a174" }, /* BLACK RIGHTWARDS ARROWHEAD */
1729 { 0x27A5, "a175" }, /* HEAVY BLACK CURVED DOWNWARDS AND RIGHTWARDS ARROW */
1730 { 0x27A6, "a176" }, /* HEAVY BLACK CURVED UPWARDS AND RIGHTWARDS ARROW */
1731 { 0x27A7, "a177" }, /* SQUAT BLACK RIGHTWARDS ARROW */
1732 { 0x27A8, "a178" }, /* HEAVY CONCAVE-POINTED BLACK RIGHTWARDS ARROW */
1733 { 0x27A9, "a179" }, /* RIGHT-SHADED WHITE RIGHTWARDS ARROW */
1734 { 0x27AA, "a193" }, /* LEFT-SHADED WHITE RIGHTWARDS ARROW */
1735 { 0x27AB, "a180" }, /* BACK-TILTED SHADOWED WHITE RIGHTWARDS ARROW */
1736 { 0x27AC, "a199" }, /* FRONT-TILTED SHADOWED WHITE RIGHTWARDS ARROW */
1737 { 0x27AD, "a181" }, /* HEAVY LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW */
1738 { 0x27AE, "a200" }, /* HEAVY UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW */
1739 { 0x27AF, "a182" }, /* NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW */
1740 { 0x27B1, "a201" }, /* NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW */
1741 { 0x27B2, "a183" }, /* CIRCLED HEAVY WHITE RIGHTWARDS ARROW */
1742 { 0x27B3, "a184" }, /* WHITE-FEATHERED RIGHTWARDS ARROW */
1743 { 0x27B4, "a197" }, /* BLACK-FEATHERED SOUTH EAST ARROW */
1744 { 0x27B6, "a194" }, /* BLACK-FEATHERED NORTH EAST ARROW */
1745 { 0x27B7, "a198" }, /* HEAVY BLACK-FEATHERED SOUTH EAST ARROW */
1746 { 0x27B8, "a186" }, /* HEAVY BLACK-FEATHERED RIGHTWARDS ARROW */
1747 { 0x27B9, "a195" }, /* HEAVY BLACK-FEATHERED NORTH EAST ARROW */
1748 { 0x27BA, "a187" }, /* TEARDROP-BARBED RIGHTWARDS ARROW */
1749 { 0x27BB, "a188" }, /* HEAVY TEARDROP-SHANKED RIGHTWARDS ARROW */
1750 { 0x27BC, "a189" }, /* WEDGE-TAILED RIGHTWARDS ARROW */
1751 { 0x27BD, "a190" }, /* HEAVY WEDGE-TAILED RIGHTWARDS ARROW */
1752 { 0x27BE, "a191" } /* OPEN-OUTLINED RIGHTWARDS ARROW */
1755 #define dingtabs (sizeof (dingtab) / sizeof (dingtab[0]))
1758 static GHashTable *uni2ps = NULL;
1759 static void
1760 new_uni_to_adobe_hash(void)
1762 int i;
1763 if (uni2ps) return;
1764 uni2ps = g_hash_table_new (NULL,NULL);
1765 for (i=0; i< unitabs; i++) {
1766 g_hash_table_insert(uni2ps,
1767 GINT_TO_POINTER(unitab[i].unicode),
1768 unitab[i].name);
1770 for (i=0; i< dingtabs; i++) {
1771 g_hash_table_insert(uni2ps,
1772 GINT_TO_POINTER(dingtab[i].unicode),
1773 dingtab[i].name);
1777 extern const char *
1778 unicode_to_ps_name (gunichar val)
1780 static GHashTable *std2ps = NULL;
1781 char *ps;
1783 if (!val) return "xi"; /* of course, you shouldn't see this everywhere */
1785 if (!uni2ps) new_uni_to_adobe_hash ();
1786 ps = g_hash_table_lookup (uni2ps, GINT_TO_POINTER (val));
1787 if (!ps) {
1788 if (!std2ps) std2ps = g_hash_table_new (NULL, NULL);
1789 ps = g_hash_table_lookup (std2ps, GINT_TO_POINTER (val));
1790 if (!ps) {
1791 ps = g_strdup_printf ("uni%.4X", val);
1792 g_hash_table_insert (uni2ps, GINT_TO_POINTER (val), ps);
1795 return ps;