1 // 2 // This header file contains the lookup tables used for converting between 3 // unicode and the 3 standard type 1 font sequences, dingbats, standard, and 4 // symbol. These data therefore allow unicode access to at least the 35 5 // standard type 1 fonts in the gsfonts font package, and probably many other 6 // type 1 fonts as well. 7 // 8 // Copyright (C) 2005 Alan W. Irwin 9 // 10 // This file is part of PLplot. 11 // 12 // PLplot is free software; you can redistribute it and/or modify 13 // it under the terms of the GNU Library General Public License as published 14 // by the Free Software Foundation; either version 2 of the License, or 15 // (at your option) any later version. 16 // 17 // PLplot 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 Library General Public License for more details. 21 // 22 // You should have received a copy of the GNU Library General Public License 23 // along with PLplot; if not, write to the Free Software 24 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 25 // 26 27 #ifndef __PLUNICODE_TYPE1_H__ 28 #define __PLUNICODE_TYPE1_H__ 29 30 typedef struct 31 { 32 PLUNICODE Unicode; 33 unsigned char Type1; 34 } Unicode_to_Type1_table; 35 36 // The following table values have been updated to be consistent 37 // with zdingbat.txt, stdenc.txt, and symbol.txt downloaded from 38 // http://unicode.org/Public/MAPPINGS/VENDORS/ADOBE/ on 2010-04-28. 39 static const int number_of_entries_in_unicode_to_dingbats_table = 203; 40 41 static const Unicode_to_Type1_table unicode_to_dingbats_lookup_table[203] = { 42 { 0x0020, 32 }, 43 { 0x00a0, 32 }, 44 { 0x2192, 213 }, 45 { 0x2194, 214 }, 46 { 0x2195, 215 }, 47 { 0x2460, 172 }, 48 { 0x2461, 173 }, 49 { 0x2462, 174 }, 50 { 0x2463, 175 }, 51 { 0x2464, 176 }, 52 { 0x2465, 177 }, 53 { 0x2466, 178 }, 54 { 0x2467, 179 }, 55 { 0x2468, 180 }, 56 { 0x2469, 181 }, 57 { 0x25a0, 110 }, 58 { 0x25b2, 115 }, 59 { 0x25bc, 116 }, 60 { 0x25c6, 117 }, 61 { 0x25cf, 108 }, 62 { 0x25d7, 119 }, 63 { 0x2605, 72 }, 64 { 0x260e, 37 }, 65 { 0x261b, 42 }, 66 { 0x261e, 43 }, 67 { 0x2660, 171 }, 68 { 0x2663, 168 }, 69 { 0x2665, 170 }, 70 { 0x2666, 169 }, 71 { 0x2701, 33 }, 72 { 0x2702, 34 }, 73 { 0x2703, 35 }, 74 { 0x2704, 36 }, 75 { 0x2706, 38 }, 76 { 0x2707, 39 }, 77 { 0x2708, 40 }, 78 { 0x2709, 41 }, 79 { 0x270c, 44 }, 80 { 0x270d, 45 }, 81 { 0x270e, 46 }, 82 { 0x270f, 47 }, 83 { 0x2710, 48 }, 84 { 0x2711, 49 }, 85 { 0x2712, 50 }, 86 { 0x2713, 51 }, 87 { 0x2714, 52 }, 88 { 0x2715, 53 }, 89 { 0x2716, 54 }, 90 { 0x2717, 55 }, 91 { 0x2718, 56 }, 92 { 0x2719, 57 }, 93 { 0x271a, 58 }, 94 { 0x271b, 59 }, 95 { 0x271c, 60 }, 96 { 0x271d, 61 }, 97 { 0x271e, 62 }, 98 { 0x271f, 63 }, 99 { 0x2720, 64 }, 100 { 0x2721, 65 }, 101 { 0x2722, 66 }, 102 { 0x2723, 67 }, 103 { 0x2724, 68 }, 104 { 0x2725, 69 }, 105 { 0x2726, 70 }, 106 { 0x2727, 71 }, 107 { 0x2729, 73 }, 108 { 0x272a, 74 }, 109 { 0x272b, 75 }, 110 { 0x272c, 76 }, 111 { 0x272d, 77 }, 112 { 0x272e, 78 }, 113 { 0x272f, 79 }, 114 { 0x2730, 80 }, 115 { 0x2731, 81 }, 116 { 0x2732, 82 }, 117 { 0x2733, 83 }, 118 { 0x2734, 84 }, 119 { 0x2735, 85 }, 120 { 0x2736, 86 }, 121 { 0x2737, 87 }, 122 { 0x2738, 88 }, 123 { 0x2739, 89 }, 124 { 0x273a, 90 }, 125 { 0x273b, 91 }, 126 { 0x273c, 92 }, 127 { 0x273d, 93 }, 128 { 0x273e, 94 }, 129 { 0x273f, 95 }, 130 { 0x2740, 96 }, 131 { 0x2741, 97 }, 132 { 0x2742, 98 }, 133 { 0x2743, 99 }, 134 { 0x2744, 100 }, 135 { 0x2745, 101 }, 136 { 0x2746, 102 }, 137 { 0x2747, 103 }, 138 { 0x2748, 104 }, 139 { 0x2749, 105 }, 140 { 0x274a, 106 }, 141 { 0x274b, 107 }, 142 { 0x274d, 109 }, 143 { 0x274f, 111 }, 144 { 0x2750, 112 }, 145 { 0x2751, 113 }, 146 { 0x2752, 114 }, 147 { 0x2756, 118 }, 148 { 0x2758, 120 }, 149 { 0x2759, 121 }, 150 { 0x275a, 122 }, 151 { 0x275b, 123 }, 152 { 0x275c, 124 }, 153 { 0x275d, 125 }, 154 { 0x275e, 126 }, 155 { 0x2761, 161 }, 156 { 0x2762, 162 }, 157 { 0x2763, 163 }, 158 { 0x2764, 164 }, 159 { 0x2765, 165 }, 160 { 0x2766, 166 }, 161 { 0x2767, 167 }, 162 { 0x2776, 182 }, 163 { 0x2777, 183 }, 164 { 0x2778, 184 }, 165 { 0x2779, 185 }, 166 { 0x277a, 186 }, 167 { 0x277b, 187 }, 168 { 0x277c, 188 }, 169 { 0x277d, 189 }, 170 { 0x277e, 190 }, 171 { 0x277f, 191 }, 172 { 0x2780, 192 }, 173 { 0x2781, 193 }, 174 { 0x2782, 194 }, 175 { 0x2783, 195 }, 176 { 0x2784, 196 }, 177 { 0x2785, 197 }, 178 { 0x2786, 198 }, 179 { 0x2787, 199 }, 180 { 0x2788, 200 }, 181 { 0x2789, 201 }, 182 { 0x278a, 202 }, 183 { 0x278b, 203 }, 184 { 0x278c, 204 }, 185 { 0x278d, 205 }, 186 { 0x278e, 206 }, 187 { 0x278f, 207 }, 188 { 0x2790, 208 }, 189 { 0x2791, 209 }, 190 { 0x2792, 210 }, 191 { 0x2793, 211 }, 192 { 0x2794, 212 }, 193 { 0x2798, 216 }, 194 { 0x2799, 217 }, 195 { 0x279a, 218 }, 196 { 0x279b, 219 }, 197 { 0x279c, 220 }, 198 { 0x279d, 221 }, 199 { 0x279e, 222 }, 200 { 0x279f, 223 }, 201 { 0x27a0, 224 }, 202 { 0x27a1, 225 }, 203 { 0x27a2, 226 }, 204 { 0x27a3, 227 }, 205 { 0x27a4, 228 }, 206 { 0x27a5, 229 }, 207 { 0x27a6, 230 }, 208 { 0x27a7, 231 }, 209 { 0x27a8, 232 }, 210 { 0x27a9, 233 }, 211 { 0x27aa, 234 }, 212 { 0x27ab, 235 }, 213 { 0x27ac, 236 }, 214 { 0x27ad, 237 }, 215 { 0x27ae, 238 }, 216 { 0x27af, 239 }, 217 { 0x27b1, 241 }, 218 { 0x27b2, 242 }, 219 { 0x27b3, 243 }, 220 { 0x27b4, 244 }, 221 { 0x27b5, 245 }, 222 { 0x27b6, 246 }, 223 { 0x27b7, 247 }, 224 { 0x27b8, 248 }, 225 { 0x27b9, 249 }, 226 { 0x27ba, 250 }, 227 { 0x27bb, 251 }, 228 { 0x27bc, 252 }, 229 { 0x27bd, 253 }, 230 { 0x27be, 254 }, 231 { 0xf8d7, 128 }, 232 { 0xf8d8, 129 }, 233 { 0xf8d9, 130 }, 234 { 0xf8da, 131 }, 235 { 0xf8db, 132 }, 236 { 0xf8dc, 133 }, 237 { 0xf8dd, 134 }, 238 { 0xf8de, 135 }, 239 { 0xf8df, 136 }, 240 { 0xf8e0, 137 }, 241 { 0xf8e1, 138 }, 242 { 0xf8e2, 139 }, 243 { 0xf8e3, 140 }, 244 { 0xf8e4, 141 }, 245 }; 246 247 static const int number_of_entries_in_unicode_to_standard_table = 154; 248 249 static const Unicode_to_Type1_table unicode_to_standard_lookup_table[154] = { 250 { 0x0020, 32 }, 251 { 0x0021, 33 }, 252 { 0x0022, 34 }, 253 { 0x0023, 35 }, 254 { 0x0024, 36 }, 255 { 0x0025, 37 }, 256 { 0x0026, 38 }, 257 { 0x0027, 169 }, 258 { 0x0028, 40 }, 259 { 0x0029, 41 }, 260 { 0x002a, 42 }, 261 { 0x002b, 43 }, 262 { 0x002c, 44 }, 263 { 0x002d, 45 }, 264 { 0x002e, 46 }, 265 { 0x002f, 47 }, 266 { 0x0030, 48 }, 267 { 0x0031, 49 }, 268 { 0x0032, 50 }, 269 { 0x0033, 51 }, 270 { 0x0034, 52 }, 271 { 0x0035, 53 }, 272 { 0x0036, 54 }, 273 { 0x0037, 55 }, 274 { 0x0038, 56 }, 275 { 0x0039, 57 }, 276 { 0x003a, 58 }, 277 { 0x003b, 59 }, 278 { 0x003c, 60 }, 279 { 0x003d, 61 }, 280 { 0x003e, 62 }, 281 { 0x003f, 63 }, 282 { 0x0040, 64 }, 283 { 0x0041, 65 }, 284 { 0x0042, 66 }, 285 { 0x0043, 67 }, 286 { 0x0044, 68 }, 287 { 0x0045, 69 }, 288 { 0x0046, 70 }, 289 { 0x0047, 71 }, 290 { 0x0048, 72 }, 291 { 0x0049, 73 }, 292 { 0x004a, 74 }, 293 { 0x004b, 75 }, 294 { 0x004c, 76 }, 295 { 0x004d, 77 }, 296 { 0x004e, 78 }, 297 { 0x004f, 79 }, 298 { 0x0050, 80 }, 299 { 0x0051, 81 }, 300 { 0x0052, 82 }, 301 { 0x0053, 83 }, 302 { 0x0054, 84 }, 303 { 0x0055, 85 }, 304 { 0x0056, 86 }, 305 { 0x0057, 87 }, 306 { 0x0058, 88 }, 307 { 0x0059, 89 }, 308 { 0x005a, 90 }, 309 { 0x005b, 91 }, 310 { 0x005c, 92 }, 311 { 0x005d, 93 }, 312 { 0x005e, 94 }, 313 { 0x005f, 95 }, 314 { 0x0060, 193 }, 315 { 0x0061, 97 }, 316 { 0x0062, 98 }, 317 { 0x0063, 99 }, 318 { 0x0064, 100 }, 319 { 0x0065, 101 }, 320 { 0x0066, 102 }, 321 { 0x0067, 103 }, 322 { 0x0068, 104 }, 323 { 0x0069, 105 }, 324 { 0x006a, 106 }, 325 { 0x006b, 107 }, 326 { 0x006c, 108 }, 327 { 0x006d, 109 }, 328 { 0x006e, 110 }, 329 { 0x006f, 111 }, 330 { 0x0070, 112 }, 331 { 0x0071, 113 }, 332 { 0x0072, 114 }, 333 { 0x0073, 115 }, 334 { 0x0074, 116 }, 335 { 0x0075, 117 }, 336 { 0x0076, 118 }, 337 { 0x0077, 119 }, 338 { 0x0078, 120 }, 339 { 0x0079, 121 }, 340 { 0x007a, 122 }, 341 { 0x007b, 123 }, 342 { 0x007c, 124 }, 343 { 0x007d, 125 }, 344 { 0x007e, 126 }, 345 { 0x00a0, 32 }, 346 { 0x00a1, 161 }, 347 { 0x00a2, 162 }, 348 { 0x00a3, 163 }, 349 { 0x00a4, 168 }, 350 { 0x00a5, 165 }, 351 { 0x00a7, 167 }, 352 { 0x00a8, 200 }, 353 { 0x00aa, 227 }, 354 { 0x00ab, 171 }, 355 { 0x00ad, 45 }, 356 { 0x00af, 197 }, 357 { 0x00b4, 194 }, 358 { 0x00b6, 182 }, 359 { 0x00b7, 180 }, 360 { 0x00b8, 203 }, 361 { 0x00ba, 235 }, 362 { 0x00bb, 187 }, 363 { 0x00bf, 191 }, 364 { 0x00c6, 225 }, 365 { 0x00d8, 233 }, 366 { 0x00df, 251 }, 367 { 0x00e6, 241 }, 368 { 0x00f8, 249 }, 369 { 0x0131, 245 }, 370 { 0x0141, 232 }, 371 { 0x0142, 248 }, 372 { 0x0152, 234 }, 373 { 0x0153, 250 }, 374 { 0x0192, 166 }, 375 { 0x02c6, 195 }, 376 { 0x02c7, 207 }, 377 { 0x02c9, 197 }, 378 { 0x02d8, 198 }, 379 { 0x02d9, 199 }, 380 { 0x02da, 202 }, 381 { 0x02db, 206 }, 382 { 0x02dc, 196 }, 383 { 0x02dd, 205 }, 384 { 0x2013, 177 }, 385 { 0x2014, 208 }, 386 { 0x2018, 96 }, 387 { 0x2019, 39 }, 388 { 0x201a, 184 }, 389 { 0x201c, 170 }, 390 { 0x201d, 186 }, 391 { 0x201e, 185 }, 392 { 0x2020, 178 }, 393 { 0x2021, 179 }, 394 { 0x2022, 183 }, 395 { 0x2026, 188 }, 396 { 0x2030, 189 }, 397 { 0x2039, 172 }, 398 { 0x203a, 173 }, 399 { 0x2044, 164 }, 400 { 0x2215, 164 }, 401 { 0x2219, 180 }, 402 { 0xfb01, 174 }, 403 { 0xfb02, 175 }, 404 }; 405 406 static const int number_of_entries_in_unicode_to_symbol_table = 194; 407 408 static const Unicode_to_Type1_table unicode_to_symbol_lookup_table[194] = { 409 { 0x0020, 32 }, 410 { 0x0021, 33 }, 411 { 0x0023, 35 }, 412 { 0x0025, 37 }, 413 { 0x0026, 38 }, 414 { 0x0028, 40 }, 415 { 0x0029, 41 }, 416 { 0x002b, 43 }, 417 { 0x002c, 44 }, 418 { 0x002e, 46 }, 419 { 0x002f, 47 }, 420 { 0x0030, 48 }, 421 { 0x0031, 49 }, 422 { 0x0032, 50 }, 423 { 0x0033, 51 }, 424 { 0x0034, 52 }, 425 { 0x0035, 53 }, 426 { 0x0036, 54 }, 427 { 0x0037, 55 }, 428 { 0x0038, 56 }, 429 { 0x0039, 57 }, 430 { 0x003a, 58 }, 431 { 0x003b, 59 }, 432 { 0x003c, 60 }, 433 { 0x003d, 61 }, 434 { 0x003e, 62 }, 435 { 0x003f, 63 }, 436 { 0x005b, 91 }, 437 { 0x005d, 93 }, 438 { 0x005f, 95 }, 439 { 0x007b, 123 }, 440 { 0x007c, 124 }, 441 { 0x007d, 125 }, 442 { 0x00a0, 32 }, 443 { 0x00ac, 216 }, 444 { 0x00b0, 176 }, 445 { 0x00b1, 177 }, 446 { 0x00b5, 109 }, 447 { 0x00d7, 180 }, 448 { 0x00f7, 184 }, 449 { 0x0192, 166 }, 450 { 0x0391, 65 }, 451 { 0x0392, 66 }, 452 { 0x0393, 71 }, 453 { 0x0394, 68 }, 454 { 0x0395, 69 }, 455 { 0x0396, 90 }, 456 { 0x0397, 72 }, 457 { 0x0398, 81 }, 458 { 0x0399, 73 }, 459 { 0x039a, 75 }, 460 { 0x039b, 76 }, 461 { 0x039c, 77 }, 462 { 0x039d, 78 }, 463 { 0x039e, 88 }, 464 { 0x039f, 79 }, 465 { 0x03a0, 80 }, 466 { 0x03a1, 82 }, 467 { 0x03a3, 83 }, 468 { 0x03a4, 84 }, 469 { 0x03a5, 85 }, 470 { 0x03a6, 70 }, 471 { 0x03a7, 67 }, 472 { 0x03a8, 89 }, 473 { 0x03a9, 87 }, 474 { 0x03b1, 97 }, 475 { 0x03b2, 98 }, 476 { 0x03b3, 103 }, 477 { 0x03b4, 100 }, 478 { 0x03b5, 101 }, 479 { 0x03b6, 122 }, 480 { 0x03b7, 104 }, 481 { 0x03b8, 113 }, 482 { 0x03b9, 105 }, 483 { 0x03ba, 107 }, 484 { 0x03bb, 108 }, 485 { 0x03bc, 109 }, 486 { 0x03bd, 110 }, 487 { 0x03be, 120 }, 488 { 0x03bf, 111 }, 489 { 0x03c0, 112 }, 490 { 0x03c1, 114 }, 491 { 0x03c2, 86 }, 492 { 0x03c3, 115 }, 493 { 0x03c4, 116 }, 494 { 0x03c5, 117 }, 495 { 0x03c6, 102 }, 496 { 0x03c7, 99 }, 497 { 0x03c8, 121 }, 498 { 0x03c9, 119 }, 499 { 0x03d1, 74 }, 500 { 0x03d2, 161 }, 501 { 0x03d5, 106 }, 502 { 0x03d6, 118 }, 503 { 0x2022, 183 }, 504 { 0x2026, 188 }, 505 { 0x2032, 162 }, 506 { 0x2033, 178 }, 507 { 0x2044, 164 }, 508 { 0x20ac, 160 }, 509 { 0x2111, 193 }, 510 { 0x2118, 195 }, 511 { 0x211c, 194 }, 512 { 0x2126, 87 }, 513 { 0x2135, 192 }, 514 { 0x2190, 172 }, 515 { 0x2191, 173 }, 516 { 0x2192, 174 }, 517 { 0x2193, 175 }, 518 { 0x2194, 171 }, 519 { 0x21b5, 191 }, 520 { 0x21d0, 220 }, 521 { 0x21d1, 221 }, 522 { 0x21d2, 222 }, 523 { 0x21d3, 223 }, 524 { 0x21d4, 219 }, 525 { 0x2200, 34 }, 526 { 0x2202, 182 }, 527 { 0x2203, 36 }, 528 { 0x2205, 198 }, 529 { 0x2206, 68 }, 530 { 0x2207, 209 }, 531 { 0x2208, 206 }, 532 { 0x2209, 207 }, 533 { 0x220b, 39 }, 534 { 0x220f, 213 }, 535 { 0x2211, 229 }, 536 { 0x2212, 45 }, 537 { 0x2215, 164 }, 538 { 0x2217, 42 }, 539 { 0x221a, 214 }, 540 { 0x221d, 181 }, 541 { 0x221e, 165 }, 542 { 0x2220, 208 }, 543 { 0x2227, 217 }, 544 { 0x2228, 218 }, 545 { 0x2229, 199 }, 546 { 0x222a, 200 }, 547 { 0x222b, 242 }, 548 { 0x2234, 92 }, 549 { 0x223c, 126 }, 550 { 0x2245, 64 }, 551 { 0x2248, 187 }, 552 { 0x2260, 185 }, 553 { 0x2261, 186 }, 554 { 0x2264, 163 }, 555 { 0x2265, 179 }, 556 { 0x2282, 204 }, 557 { 0x2283, 201 }, 558 { 0x2284, 203 }, 559 { 0x2286, 205 }, 560 { 0x2287, 202 }, 561 { 0x2295, 197 }, 562 { 0x2297, 196 }, 563 { 0x22a5, 94 }, 564 { 0x22c5, 215 }, 565 { 0x2320, 243 }, 566 { 0x2321, 245 }, 567 { 0x2329, 225 }, 568 { 0x232a, 241 }, 569 { 0x25ca, 224 }, 570 { 0x2660, 170 }, 571 { 0x2663, 167 }, 572 { 0x2665, 169 }, 573 { 0x2666, 168 }, 574 { 0xf6d9, 211 }, 575 { 0xf6da, 210 }, 576 { 0xf6db, 212 }, 577 { 0xf8e5, 96 }, 578 { 0xf8e6, 189 }, 579 { 0xf8e7, 190 }, 580 { 0xf8e8, 226 }, 581 { 0xf8e9, 227 }, 582 { 0xf8ea, 228 }, 583 { 0xf8eb, 230 }, 584 { 0xf8ec, 231 }, 585 { 0xf8ed, 232 }, 586 { 0xf8ee, 233 }, 587 { 0xf8ef, 234 }, 588 { 0xf8f0, 235 }, 589 { 0xf8f1, 236 }, 590 { 0xf8f2, 237 }, 591 { 0xf8f3, 238 }, 592 { 0xf8f4, 239 }, 593 { 0xf8f5, 244 }, 594 { 0xf8f6, 246 }, 595 { 0xf8f7, 247 }, 596 { 0xf8f8, 248 }, 597 { 0xf8f9, 249 }, 598 { 0xf8fa, 250 }, 599 { 0xf8fb, 251 }, 600 { 0xf8fc, 252 }, 601 { 0xf8fd, 253 }, 602 { 0xf8fe, 254 }, 603 }; 604 605 #endif // __PLUNICODE_TYPE1_H__ 606