1 | /* |
2 | * << Haru Free PDF Library >> -- hpdf_fontdef_kr.c |
3 | * |
4 | * URL: http://libharu.org |
5 | * |
6 | * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp> |
7 | * Copyright (c) 2007-2009 Antony Dovgal <tony@daylessday.org> |
8 | * |
9 | * Permission to use, copy, modify, distribute and sell this software |
10 | * and its documentation for any purpose is hereby granted without fee, |
11 | * provided that the above copyright notice appear in all copies and |
12 | * that both that copyright notice and this permission notice appear |
13 | * in supporting documentation. |
14 | * It is provided "as is" without express or implied warranty. |
15 | * |
16 | */ |
17 | |
18 | #include "hpdf_conf.h" |
19 | #include "hpdf_utils.h" |
20 | #include "hpdf.h" |
21 | |
22 | /*----------------------------------------------------------------------------*/ |
23 | |
24 | static const HPDF_CID_Width DotumChe_W_ARRAY[] = { |
25 | {1, 500}, |
26 | {2, 500}, |
27 | {3, 500}, |
28 | {4, 500}, |
29 | {5, 500}, |
30 | {6, 500}, |
31 | {7, 500}, |
32 | {8, 500}, |
33 | {9, 500}, |
34 | {10, 500}, |
35 | {11, 500}, |
36 | {12, 500}, |
37 | {13, 500}, |
38 | {14, 500}, |
39 | {15, 500}, |
40 | {16, 500}, |
41 | {17, 500}, |
42 | {18, 500}, |
43 | {19, 500}, |
44 | {20, 500}, |
45 | {21, 500}, |
46 | {22, 500}, |
47 | {23, 500}, |
48 | {24, 500}, |
49 | {25, 500}, |
50 | {26, 500}, |
51 | {27, 500}, |
52 | {28, 500}, |
53 | {29, 500}, |
54 | {30, 500}, |
55 | {31, 500}, |
56 | {32, 500}, |
57 | {33, 500}, |
58 | {34, 500}, |
59 | {35, 500}, |
60 | {36, 500}, |
61 | {37, 500}, |
62 | {38, 500}, |
63 | {39, 500}, |
64 | {40, 500}, |
65 | {41, 500}, |
66 | {42, 500}, |
67 | {43, 500}, |
68 | {44, 500}, |
69 | {45, 500}, |
70 | {46, 500}, |
71 | {47, 500}, |
72 | {48, 500}, |
73 | {49, 500}, |
74 | {50, 500}, |
75 | {51, 500}, |
76 | {52, 500}, |
77 | {53, 500}, |
78 | {54, 500}, |
79 | {55, 500}, |
80 | {56, 500}, |
81 | {57, 500}, |
82 | {58, 500}, |
83 | {59, 500}, |
84 | {60, 500}, |
85 | {61, 500}, |
86 | {62, 500}, |
87 | {63, 500}, |
88 | {64, 500}, |
89 | {65, 500}, |
90 | {66, 500}, |
91 | {67, 500}, |
92 | {68, 500}, |
93 | {69, 500}, |
94 | {70, 500}, |
95 | {71, 500}, |
96 | {72, 500}, |
97 | {73, 500}, |
98 | {74, 500}, |
99 | {75, 500}, |
100 | {76, 500}, |
101 | {77, 500}, |
102 | {78, 500}, |
103 | {79, 500}, |
104 | {80, 500}, |
105 | {81, 500}, |
106 | {82, 500}, |
107 | {83, 500}, |
108 | {84, 500}, |
109 | {85, 500}, |
110 | {86, 500}, |
111 | {87, 500}, |
112 | {88, 500}, |
113 | {89, 500}, |
114 | {90, 500}, |
115 | {91, 500}, |
116 | {92, 500}, |
117 | {93, 500}, |
118 | {94, 500}, |
119 | {95, 500}, |
120 | {8094, 500}, |
121 | {8095, 500}, |
122 | {8096, 500}, |
123 | {8097, 500}, |
124 | {8098, 500}, |
125 | {8099, 500}, |
126 | {8100, 500}, |
127 | {8101, 500}, |
128 | {8102, 500}, |
129 | {8103, 500}, |
130 | {8104, 500}, |
131 | {8105, 500}, |
132 | {8106, 500}, |
133 | {8107, 500}, |
134 | {8108, 500}, |
135 | {8109, 500}, |
136 | {8110, 500}, |
137 | {8111, 500}, |
138 | {8112, 500}, |
139 | {8113, 500}, |
140 | {8114, 500}, |
141 | {8115, 500}, |
142 | {8116, 500}, |
143 | {8117, 500}, |
144 | {8118, 500}, |
145 | {8119, 500}, |
146 | {8120, 500}, |
147 | {8121, 500}, |
148 | {8122, 500}, |
149 | {8123, 500}, |
150 | {8124, 500}, |
151 | {8125, 500}, |
152 | {8126, 500}, |
153 | {8127, 500}, |
154 | {8128, 500}, |
155 | {8129, 500}, |
156 | {8130, 500}, |
157 | {8131, 500}, |
158 | {8132, 500}, |
159 | {8133, 500}, |
160 | {8134, 500}, |
161 | {8135, 500}, |
162 | {8136, 500}, |
163 | {8137, 500}, |
164 | {8138, 500}, |
165 | {8139, 500}, |
166 | {8140, 500}, |
167 | {8141, 500}, |
168 | {8142, 500}, |
169 | {8143, 500}, |
170 | {8144, 500}, |
171 | {8145, 500}, |
172 | {8146, 500}, |
173 | {8147, 500}, |
174 | {8148, 500}, |
175 | {8149, 500}, |
176 | {8150, 500}, |
177 | {8151, 500}, |
178 | {8152, 500}, |
179 | {8153, 500}, |
180 | {8154, 500}, |
181 | {8155, 500}, |
182 | {8156, 500}, |
183 | {8157, 500}, |
184 | {8158, 500}, |
185 | {8159, 500}, |
186 | {8160, 500}, |
187 | {8161, 500}, |
188 | {8162, 500}, |
189 | {8163, 500}, |
190 | {8164, 500}, |
191 | {8165, 500}, |
192 | {8166, 500}, |
193 | {8167, 500}, |
194 | {8168, 500}, |
195 | {8169, 500}, |
196 | {8170, 500}, |
197 | {8171, 500}, |
198 | {8172, 500}, |
199 | {8173, 500}, |
200 | {8174, 500}, |
201 | {8175, 500}, |
202 | {8176, 500}, |
203 | {8177, 500}, |
204 | {8178, 500}, |
205 | {8179, 500}, |
206 | {8180, 500}, |
207 | {8181, 500}, |
208 | {8182, 500}, |
209 | {8183, 500}, |
210 | {8184, 500}, |
211 | {8185, 500}, |
212 | {8186, 500}, |
213 | {8187, 500}, |
214 | {8188, 500}, |
215 | {0xFFFF, 0} |
216 | }; |
217 | |
218 | |
219 | static const HPDF_CID_Width Dotum_W_ARRAY[] = { |
220 | {1, 333}, |
221 | {2, 333}, |
222 | {3, 416}, |
223 | {4, 625}, |
224 | {5, 500}, |
225 | {6, 916}, |
226 | {7, 708}, |
227 | {8, 291}, |
228 | {9, 375}, |
229 | {10, 375}, |
230 | {11, 583}, |
231 | {12, 582}, |
232 | {13, 375}, |
233 | {14, 589}, |
234 | {15, 375}, |
235 | {16, 416}, |
236 | {17, 583}, |
237 | {18, 583}, |
238 | {19, 583}, |
239 | {20, 583}, |
240 | {21, 583}, |
241 | {22, 583}, |
242 | {23, 583}, |
243 | {24, 583}, |
244 | {25, 583}, |
245 | {26, 583}, |
246 | {27, 339}, |
247 | {28, 339}, |
248 | {29, 625}, |
249 | {30, 583}, |
250 | {31, 625}, |
251 | {32, 583}, |
252 | {34, 666}, |
253 | {35, 679}, |
254 | {36, 720}, |
255 | {37, 724}, |
256 | {38, 628}, |
257 | {39, 599}, |
258 | {40, 750}, |
259 | {41, 722}, |
260 | {42, 257}, |
261 | {43, 484}, |
262 | {44, 656}, |
263 | {45, 541}, |
264 | {46, 808}, |
265 | {47, 697}, |
266 | {48, 750}, |
267 | {49, 642}, |
268 | {50, 750}, |
269 | {51, 667}, |
270 | {52, 638}, |
271 | {53, 583}, |
272 | {54, 724}, |
273 | {55, 601}, |
274 | {56, 892}, |
275 | {57, 603}, |
276 | {58, 601}, |
277 | {59, 603}, |
278 | {60, 500}, |
279 | {61, 958}, |
280 | {62, 500}, |
281 | {63, 625}, |
282 | {64, 500}, |
283 | {65, 332}, |
284 | {66, 583}, |
285 | {67, 599}, |
286 | {68, 558}, |
287 | {69, 603}, |
288 | {70, 558}, |
289 | {71, 343}, |
290 | {72, 597}, |
291 | {73, 560}, |
292 | {74, 228}, |
293 | {75, 228}, |
294 | {76, 509}, |
295 | {77, 230}, |
296 | {78, 916}, |
297 | {79, 568}, |
298 | {80, 599}, |
299 | {81, 601}, |
300 | {82, 603}, |
301 | {83, 320}, |
302 | {84, 515}, |
303 | {85, 312}, |
304 | {86, 554}, |
305 | {87, 474}, |
306 | {88, 724}, |
307 | {89, 478}, |
308 | {90, 480}, |
309 | {91, 482}, |
310 | {92, 500}, |
311 | {93, 500}, |
312 | {94, 500}, |
313 | {95, 791}, |
314 | {104, 332}, |
315 | {107, 500}, |
316 | {109, 500}, |
317 | {110, 687}, |
318 | {114, 291}, |
319 | {115, 291}, |
320 | {116, 458}, |
321 | {117, 458}, |
322 | {130, 833}, |
323 | {131, 833}, |
324 | {132, 833}, |
325 | {133, 833}, |
326 | {134, 833}, |
327 | {135, 833}, |
328 | {136, 911}, |
329 | {138, 405}, |
330 | {139, 335}, |
331 | {140, 563}, |
332 | {146, 625}, |
333 | {147, 625}, |
334 | {151, 562}, |
335 | {153, 833}, |
336 | {155, 562}, |
337 | {160, 937}, |
338 | {164, 889}, |
339 | {165, 889}, |
340 | {167, 914}, |
341 | {169, 914}, |
342 | {172, 750}, |
343 | {173, 750}, |
344 | {178, 500}, |
345 | {182, 375}, |
346 | {191, 718}, |
347 | {199, 333}, |
348 | {201, 437}, |
349 | {202, 375}, |
350 | {203, 437}, |
351 | {204, 312}, |
352 | {205, 317}, |
353 | {206, 333}, |
354 | {207, 312}, |
355 | {208, 416}, |
356 | {209, 583}, |
357 | {212, 812}, |
358 | {213, 687}, |
359 | {214, 562}, |
360 | {222, 750}, |
361 | {224, 792}, |
362 | {226, 843}, |
363 | {244, 562}, |
364 | {245, 562}, |
365 | {246, 562}, |
366 | {247, 750}, |
367 | {254, 687}, |
368 | {471, 666}, |
369 | {472, 708}, |
370 | {473, 594}, |
371 | {474, 705}, |
372 | {475, 666}, |
373 | {476, 625}, |
374 | {477, 750}, |
375 | {478, 791}, |
376 | {479, 291}, |
377 | {480, 708}, |
378 | {481, 666}, |
379 | {482, 875}, |
380 | {483, 750}, |
381 | {484, 750}, |
382 | {485, 791}, |
383 | {486, 702}, |
384 | {487, 666}, |
385 | {488, 674}, |
386 | {489, 583}, |
387 | {490, 625}, |
388 | {491, 770}, |
389 | {492, 625}, |
390 | {493, 794}, |
391 | {494, 750}, |
392 | {495, 625}, |
393 | {496, 563}, |
394 | {497, 562}, |
395 | {498, 571}, |
396 | {499, 562}, |
397 | {500, 500}, |
398 | {501, 625}, |
399 | {502, 687}, |
400 | {503, 375}, |
401 | {504, 562}, |
402 | {505, 687}, |
403 | {506, 567}, |
404 | {507, 500}, |
405 | {508, 500}, |
406 | {509, 625}, |
407 | {510, 687}, |
408 | {511, 625}, |
409 | {512, 625}, |
410 | {513, 583}, |
411 | {514, 583}, |
412 | {515, 625}, |
413 | {516, 583}, |
414 | {517, 731}, |
415 | {518, 750}, |
416 | {590, 500}, |
417 | {643, 750}, |
418 | {666, 937}, |
419 | {667, 751}, |
420 | {668, 403}, |
421 | {669, 750}, |
422 | {670, 750}, |
423 | {671, 583}, |
424 | {672, 583}, |
425 | {673, 791}, |
426 | {674, 934}, |
427 | {675, 375}, |
428 | {676, 666}, |
429 | {677, 583}, |
430 | {678, 750}, |
431 | {748, 500}, |
432 | {751, 500}, |
433 | {752, 500}, |
434 | {753, 562}, |
435 | {754, 561}, |
436 | {755, 562}, |
437 | {756, 562}, |
438 | {757, 812}, |
439 | {758, 625}, |
440 | {759, 625}, |
441 | {760, 583}, |
442 | {761, 250}, |
443 | {762, 500}, |
444 | {763, 562}, |
445 | {764, 312}, |
446 | {765, 250}, |
447 | {766, 625}, |
448 | {767, 875}, |
449 | {768, 625}, |
450 | {769, 625}, |
451 | {770, 333}, |
452 | {771, 625}, |
453 | {772, 687}, |
454 | {842, 375}, |
455 | {843, 322}, |
456 | {844, 322}, |
457 | {846, 500}, |
458 | {1020, 666}, |
459 | {1021, 708}, |
460 | {1022, 708}, |
461 | {1023, 594}, |
462 | {1024, 812}, |
463 | {1025, 666}, |
464 | {1026, 666}, |
465 | {1027, 937}, |
466 | {1028, 583}, |
467 | {1029, 750}, |
468 | {1030, 750}, |
469 | {1031, 708}, |
470 | {1032, 714}, |
471 | {1033, 875}, |
472 | {1034, 750}, |
473 | {1035, 791}, |
474 | {1036, 750}, |
475 | {1037, 666}, |
476 | {1038, 750}, |
477 | {1039, 583}, |
478 | {1040, 500}, |
479 | {1041, 770}, |
480 | {1042, 625}, |
481 | {1043, 742}, |
482 | {1044, 583}, |
483 | {1045, 966}, |
484 | {1046, 966}, |
485 | {1047, 787}, |
486 | {1048, 825}, |
487 | {1049, 666}, |
488 | {1050, 738}, |
489 | {1051, 991}, |
490 | {1052, 708}, |
491 | {1053, 583}, |
492 | {1054, 583}, |
493 | {1055, 610}, |
494 | {1056, 583}, |
495 | {1057, 653}, |
496 | {1058, 583}, |
497 | {1059, 583}, |
498 | {1060, 768}, |
499 | {1061, 563}, |
500 | {1062, 658}, |
501 | {1063, 662}, |
502 | {1064, 562}, |
503 | {1065, 641}, |
504 | {1066, 740}, |
505 | {1067, 640}, |
506 | {1068, 625}, |
507 | {1069, 645}, |
508 | {1070, 625}, |
509 | {1071, 583}, |
510 | {1072, 595}, |
511 | {1073, 500}, |
512 | {1074, 763}, |
513 | {1075, 500}, |
514 | {1076, 619}, |
515 | {1077, 583}, |
516 | {1078, 840}, |
517 | {1079, 838}, |
518 | {1080, 609}, |
519 | {1081, 779}, |
520 | {1082, 512}, |
521 | {1083, 574}, |
522 | {1084, 770}, |
523 | {1085, 581}, |
524 | {8094, 333}, |
525 | {8095, 333}, |
526 | {8096, 416}, |
527 | {8097, 625}, |
528 | {8098, 500}, |
529 | {8099, 916}, |
530 | {8100, 708}, |
531 | {8101, 291}, |
532 | {8102, 375}, |
533 | {8103, 375}, |
534 | {8104, 583}, |
535 | {8105, 582}, |
536 | {8106, 375}, |
537 | {8107, 589}, |
538 | {8108, 375}, |
539 | {8109, 416}, |
540 | {8110, 583}, |
541 | {8111, 583}, |
542 | {8112, 583}, |
543 | {8113, 583}, |
544 | {8114, 583}, |
545 | {8115, 583}, |
546 | {8116, 583}, |
547 | {8117, 583}, |
548 | {8118, 583}, |
549 | {8119, 583}, |
550 | {8120, 339}, |
551 | {8121, 339}, |
552 | {8122, 625}, |
553 | {8123, 583}, |
554 | {8124, 625}, |
555 | {8125, 583}, |
556 | {8127, 666}, |
557 | {8128, 679}, |
558 | {8129, 720}, |
559 | {8130, 724}, |
560 | {8131, 628}, |
561 | {8132, 599}, |
562 | {8133, 750}, |
563 | {8134, 722}, |
564 | {8135, 257}, |
565 | {8136, 484}, |
566 | {8137, 656}, |
567 | {8138, 541}, |
568 | {8139, 808}, |
569 | {8140, 697}, |
570 | {8141, 750}, |
571 | {8142, 642}, |
572 | {8143, 750}, |
573 | {8144, 667}, |
574 | {8145, 638}, |
575 | {8146, 583}, |
576 | {8147, 724}, |
577 | {8148, 601}, |
578 | {8149, 892}, |
579 | {8150, 603}, |
580 | {8151, 601}, |
581 | {8152, 603}, |
582 | {8153, 500}, |
583 | {8154, 958}, |
584 | {8155, 500}, |
585 | {8156, 625}, |
586 | {8157, 500}, |
587 | {8158, 332}, |
588 | {8159, 583}, |
589 | {8160, 599}, |
590 | {8161, 558}, |
591 | {8162, 603}, |
592 | {8163, 558}, |
593 | {8164, 343}, |
594 | {8165, 597}, |
595 | {8166, 560}, |
596 | {8167, 228}, |
597 | {8168, 228}, |
598 | {8169, 509}, |
599 | {8170, 230}, |
600 | {8171, 916}, |
601 | {8172, 568}, |
602 | {8173, 599}, |
603 | {8174, 601}, |
604 | {8175, 603}, |
605 | {8176, 320}, |
606 | {8177, 515}, |
607 | {8178, 312}, |
608 | {8179, 554}, |
609 | {8180, 474}, |
610 | {8181, 724}, |
611 | {8182, 478}, |
612 | {8183, 480}, |
613 | {8184, 482}, |
614 | {8185, 500}, |
615 | {8186, 500}, |
616 | {8187, 500}, |
617 | {8188, 791}, |
618 | {0xFFFF, 0} |
619 | }; |
620 | |
621 | |
622 | static const HPDF_CID_Width BatangChe_W_ARRAY[] = { |
623 | {1, 500}, |
624 | {2, 500}, |
625 | {3, 500}, |
626 | {4, 500}, |
627 | {5, 500}, |
628 | {6, 500}, |
629 | {7, 500}, |
630 | {8, 500}, |
631 | {9, 500}, |
632 | {10, 500}, |
633 | {11, 500}, |
634 | {12, 500}, |
635 | {13, 500}, |
636 | {14, 500}, |
637 | {15, 500}, |
638 | {16, 500}, |
639 | {17, 500}, |
640 | {18, 500}, |
641 | {19, 500}, |
642 | {20, 500}, |
643 | {21, 500}, |
644 | {22, 500}, |
645 | {23, 500}, |
646 | {24, 500}, |
647 | {25, 500}, |
648 | {26, 500}, |
649 | {27, 500}, |
650 | {28, 500}, |
651 | {29, 500}, |
652 | {30, 500}, |
653 | {31, 500}, |
654 | {32, 500}, |
655 | {33, 500}, |
656 | {34, 500}, |
657 | {35, 500}, |
658 | {36, 500}, |
659 | {37, 500}, |
660 | {38, 500}, |
661 | {39, 500}, |
662 | {40, 500}, |
663 | {41, 500}, |
664 | {42, 500}, |
665 | {43, 500}, |
666 | {44, 500}, |
667 | {45, 500}, |
668 | {46, 500}, |
669 | {47, 500}, |
670 | {48, 500}, |
671 | {49, 500}, |
672 | {50, 500}, |
673 | {51, 500}, |
674 | {52, 500}, |
675 | {53, 500}, |
676 | {54, 500}, |
677 | {55, 500}, |
678 | {56, 500}, |
679 | {57, 500}, |
680 | {58, 500}, |
681 | {59, 500}, |
682 | {60, 500}, |
683 | {61, 500}, |
684 | {62, 500}, |
685 | {63, 500}, |
686 | {64, 500}, |
687 | {65, 500}, |
688 | {66, 500}, |
689 | {67, 500}, |
690 | {68, 500}, |
691 | {69, 500}, |
692 | {70, 500}, |
693 | {71, 500}, |
694 | {72, 500}, |
695 | {73, 500}, |
696 | {74, 500}, |
697 | {75, 500}, |
698 | {76, 500}, |
699 | {77, 500}, |
700 | {78, 500}, |
701 | {79, 500}, |
702 | {80, 500}, |
703 | {81, 500}, |
704 | {82, 500}, |
705 | {83, 500}, |
706 | {84, 500}, |
707 | {85, 500}, |
708 | {86, 500}, |
709 | {87, 500}, |
710 | {88, 500}, |
711 | {89, 500}, |
712 | {90, 500}, |
713 | {91, 500}, |
714 | {92, 500}, |
715 | {93, 500}, |
716 | {94, 500}, |
717 | {95, 500}, |
718 | {8094, 500}, |
719 | {8095, 500}, |
720 | {8096, 500}, |
721 | {8097, 500}, |
722 | {8098, 500}, |
723 | {8099, 500}, |
724 | {8100, 500}, |
725 | {8101, 500}, |
726 | {8102, 500}, |
727 | {8103, 500}, |
728 | {8104, 500}, |
729 | {8105, 500}, |
730 | {8106, 500}, |
731 | {8107, 500}, |
732 | {8108, 500}, |
733 | {8109, 500}, |
734 | {8110, 500}, |
735 | {8111, 500}, |
736 | {8112, 500}, |
737 | {8113, 500}, |
738 | {8114, 500}, |
739 | {8115, 500}, |
740 | {8116, 500}, |
741 | {8117, 500}, |
742 | {8118, 500}, |
743 | {8119, 500}, |
744 | {8120, 500}, |
745 | {8121, 500}, |
746 | {8122, 500}, |
747 | {8123, 500}, |
748 | {8124, 500}, |
749 | {8125, 500}, |
750 | {8126, 500}, |
751 | {8127, 500}, |
752 | {8128, 500}, |
753 | {8129, 500}, |
754 | {8130, 500}, |
755 | {8131, 500}, |
756 | {8132, 500}, |
757 | {8133, 500}, |
758 | {8134, 500}, |
759 | {8135, 500}, |
760 | {8136, 500}, |
761 | {8137, 500}, |
762 | {8138, 500}, |
763 | {8139, 500}, |
764 | {8140, 500}, |
765 | {8141, 500}, |
766 | {8142, 500}, |
767 | {8143, 500}, |
768 | {8144, 500}, |
769 | {8145, 500}, |
770 | {8146, 500}, |
771 | {8147, 500}, |
772 | {8148, 500}, |
773 | {8149, 500}, |
774 | {8150, 500}, |
775 | {8151, 500}, |
776 | {8152, 500}, |
777 | {8153, 500}, |
778 | {8154, 500}, |
779 | {8155, 500}, |
780 | {8156, 500}, |
781 | {8157, 500}, |
782 | {8158, 500}, |
783 | {8159, 500}, |
784 | {8160, 500}, |
785 | {8161, 500}, |
786 | {8162, 500}, |
787 | {8163, 500}, |
788 | {8164, 500}, |
789 | {8165, 500}, |
790 | {8166, 500}, |
791 | {8167, 500}, |
792 | {8168, 500}, |
793 | {8169, 500}, |
794 | {8170, 500}, |
795 | {8171, 500}, |
796 | {8172, 500}, |
797 | {8173, 500}, |
798 | {8174, 500}, |
799 | {8175, 500}, |
800 | {8176, 500}, |
801 | {8177, 500}, |
802 | {8178, 500}, |
803 | {8179, 500}, |
804 | {8180, 500}, |
805 | {8181, 500}, |
806 | {8182, 500}, |
807 | {8183, 500}, |
808 | {8184, 500}, |
809 | {8185, 500}, |
810 | {8186, 500}, |
811 | {8187, 500}, |
812 | {8188, 500}, |
813 | {0xFFFF, 0} |
814 | }; |
815 | |
816 | |
817 | |
818 | static const HPDF_CID_Width Batang_W_ARRAY[] = { |
819 | {1, 333}, |
820 | {2, 416}, |
821 | {3, 416}, |
822 | {4, 625}, |
823 | {5, 541}, |
824 | {6, 666}, |
825 | {7, 583}, |
826 | {8, 291}, |
827 | {9, 416}, |
828 | {10, 416}, |
829 | {11, 500}, |
830 | {12, 625}, |
831 | {13, 333}, |
832 | {14, 832}, |
833 | {15, 333}, |
834 | {16, 375}, |
835 | {17, 583}, |
836 | {18, 583}, |
837 | {19, 583}, |
838 | {20, 583}, |
839 | {21, 583}, |
840 | {22, 583}, |
841 | {23, 583}, |
842 | {24, 583}, |
843 | {25, 583}, |
844 | {26, 583}, |
845 | {27, 333}, |
846 | {28, 333}, |
847 | {29, 708}, |
848 | {30, 625}, |
849 | {31, 708}, |
850 | {32, 583}, |
851 | {33, 735}, |
852 | {34, 687}, |
853 | {35, 683}, |
854 | {36, 687}, |
855 | {37, 678}, |
856 | {38, 657}, |
857 | {39, 656}, |
858 | {40, 700}, |
859 | {41, 702}, |
860 | {42, 462}, |
861 | {43, 562}, |
862 | {44, 687}, |
863 | {45, 625}, |
864 | {46, 812}, |
865 | {47, 711}, |
866 | {48, 672}, |
867 | {49, 651}, |
868 | {50, 702}, |
869 | {51, 702}, |
870 | {52, 619}, |
871 | {53, 648}, |
872 | {54, 712}, |
873 | {55, 682}, |
874 | {56, 792}, |
875 | {57, 666}, |
876 | {58, 667}, |
877 | {59, 634}, |
878 | {60, 500}, |
879 | {61, 750}, |
880 | {62, 500}, |
881 | {63, 562}, |
882 | {64, 500}, |
883 | {65, 327}, |
884 | {66, 613}, |
885 | {67, 637}, |
886 | {68, 615}, |
887 | {69, 637}, |
888 | {70, 610}, |
889 | {71, 500}, |
890 | {72, 637}, |
891 | {73, 650}, |
892 | {74, 469}, |
893 | {75, 471}, |
894 | {76, 641}, |
895 | {77, 500}, |
896 | {78, 875}, |
897 | {79, 646}, |
898 | {80, 657}, |
899 | {81, 655}, |
900 | {82, 655}, |
901 | {83, 583}, |
902 | {84, 583}, |
903 | {85, 562}, |
904 | {86, 645}, |
905 | {87, 645}, |
906 | {88, 750}, |
907 | {89, 613}, |
908 | {90, 647}, |
909 | {91, 551}, |
910 | {92, 500}, |
911 | {93, 500}, |
912 | {94, 500}, |
913 | {95, 791}, |
914 | {104, 332}, |
915 | {107, 500}, |
916 | {109, 437}, |
917 | {110, 687}, |
918 | {114, 333}, |
919 | {115, 333}, |
920 | {116, 500}, |
921 | {117, 500}, |
922 | {130, 833}, |
923 | {131, 833}, |
924 | {132, 833}, |
925 | {133, 833}, |
926 | {134, 833}, |
927 | {135, 833}, |
928 | {136, 913}, |
929 | {138, 437}, |
930 | {139, 333}, |
931 | {140, 525}, |
932 | {146, 625}, |
933 | {147, 625}, |
934 | {151, 593}, |
935 | {153, 833}, |
936 | {155, 625}, |
937 | {164, 889}, |
938 | {165, 889}, |
939 | {167, 914}, |
940 | {169, 914}, |
941 | {172, 750}, |
942 | {173, 750}, |
943 | {178, 549}, |
944 | {182, 569}, |
945 | {191, 718}, |
946 | {199, 375}, |
947 | {201, 375}, |
948 | {202, 375}, |
949 | {203, 500}, |
950 | {204, 312}, |
951 | {205, 312}, |
952 | {206, 333}, |
953 | {207, 375}, |
954 | {208, 416}, |
955 | {209, 583}, |
956 | {212, 897}, |
957 | {213, 798}, |
958 | {214, 500}, |
959 | {222, 750}, |
960 | {224, 792}, |
961 | {226, 843}, |
962 | {244, 687}, |
963 | {245, 562}, |
964 | {246, 562}, |
965 | {247, 750}, |
966 | {254, 687}, |
967 | {258, 959}, |
968 | {471, 708}, |
969 | {472, 708}, |
970 | {473, 666}, |
971 | {474, 687}, |
972 | {475, 708}, |
973 | {476, 687}, |
974 | {477, 750}, |
975 | {478, 708}, |
976 | {479, 587}, |
977 | {480, 750}, |
978 | {481, 708}, |
979 | {482, 833}, |
980 | {483, 750}, |
981 | {484, 791}, |
982 | {485, 708}, |
983 | {486, 763}, |
984 | {487, 666}, |
985 | {488, 708}, |
986 | {489, 708}, |
987 | {490, 708}, |
988 | {491, 687}, |
989 | {492, 708}, |
990 | {493, 883}, |
991 | {494, 812}, |
992 | {495, 666}, |
993 | {496, 625}, |
994 | {497, 666}, |
995 | {498, 597}, |
996 | {499, 562}, |
997 | {500, 500}, |
998 | {501, 666}, |
999 | {502, 625}, |
1000 | {503, 543}, |
1001 | {504, 666}, |
1002 | {505, 750}, |
1003 | {506, 666}, |
1004 | {507, 666}, |
1005 | {508, 500}, |
1006 | {509, 616}, |
1007 | {510, 728}, |
1008 | {511, 666}, |
1009 | {512, 687}, |
1010 | {513, 599}, |
1011 | {514, 625}, |
1012 | {515, 666}, |
1013 | {516, 730}, |
1014 | {517, 812}, |
1015 | {518, 777}, |
1016 | {590, 525}, |
1017 | {643, 812}, |
1018 | {667, 708}, |
1019 | {668, 500}, |
1020 | {669, 750}, |
1021 | {671, 666}, |
1022 | {672, 666}, |
1023 | {673, 708}, |
1024 | {675, 500}, |
1025 | {676, 666}, |
1026 | {677, 708}, |
1027 | {678, 750}, |
1028 | {748, 500}, |
1029 | {751, 500}, |
1030 | {752, 500}, |
1031 | {753, 500}, |
1032 | {754, 500}, |
1033 | {755, 500}, |
1034 | {756, 500}, |
1035 | {757, 812}, |
1036 | {758, 666}, |
1037 | {759, 625}, |
1038 | {760, 666}, |
1039 | {761, 541}, |
1040 | {762, 901}, |
1041 | {763, 666}, |
1042 | {764, 541}, |
1043 | {765, 541}, |
1044 | {766, 666}, |
1045 | {767, 948}, |
1046 | {768, 750}, |
1047 | {769, 666}, |
1048 | {770, 583}, |
1049 | {771, 666}, |
1050 | {772, 666}, |
1051 | {842, 500}, |
1052 | {843, 500}, |
1053 | {844, 500}, |
1054 | {846, 500}, |
1055 | {1020, 708}, |
1056 | {1021, 708}, |
1057 | {1022, 708}, |
1058 | {1023, 666}, |
1059 | {1024, 773}, |
1060 | {1025, 708}, |
1061 | {1026, 708}, |
1062 | {1028, 687}, |
1063 | {1029, 750}, |
1064 | {1030, 750}, |
1065 | {1031, 750}, |
1066 | {1032, 797}, |
1067 | {1033, 833}, |
1068 | {1034, 750}, |
1069 | {1035, 708}, |
1070 | {1036, 750}, |
1071 | {1037, 666}, |
1072 | {1038, 708}, |
1073 | {1039, 708}, |
1074 | {1040, 666}, |
1075 | {1041, 687}, |
1076 | {1042, 708}, |
1077 | {1043, 750}, |
1078 | {1044, 666}, |
1079 | {1047, 843}, |
1080 | {1049, 647}, |
1081 | {1050, 687}, |
1082 | {1052, 750}, |
1083 | {1053, 666}, |
1084 | {1054, 625}, |
1085 | {1055, 666}, |
1086 | {1056, 605}, |
1087 | {1057, 666}, |
1088 | {1058, 625}, |
1089 | {1059, 625}, |
1090 | {1060, 812}, |
1091 | {1061, 599}, |
1092 | {1062, 715}, |
1093 | {1063, 715}, |
1094 | {1064, 666}, |
1095 | {1065, 760}, |
1096 | {1066, 729}, |
1097 | {1067, 650}, |
1098 | {1068, 616}, |
1099 | {1069, 667}, |
1100 | {1070, 666}, |
1101 | {1071, 625}, |
1102 | {1072, 625}, |
1103 | {1073, 666}, |
1104 | {1074, 767}, |
1105 | {1075, 625}, |
1106 | {1076, 720}, |
1107 | {1077, 666}, |
1108 | {1078, 797}, |
1109 | {1079, 841}, |
1110 | {1080, 733}, |
1111 | {1081, 875}, |
1112 | {1082, 649}, |
1113 | {1083, 625}, |
1114 | {1084, 887}, |
1115 | {1085, 659}, |
1116 | {8094, 333}, |
1117 | {8095, 416}, |
1118 | {8096, 416}, |
1119 | {8097, 625}, |
1120 | {8098, 541}, |
1121 | {8099, 666}, |
1122 | {8100, 583}, |
1123 | {8101, 291}, |
1124 | {8102, 416}, |
1125 | {8103, 416}, |
1126 | {8104, 500}, |
1127 | {8105, 625}, |
1128 | {8106, 333}, |
1129 | {8107, 832}, |
1130 | {8108, 333}, |
1131 | {8109, 375}, |
1132 | {8110, 583}, |
1133 | {8111, 583}, |
1134 | {8112, 583}, |
1135 | {8113, 583}, |
1136 | {8114, 583}, |
1137 | {8115, 583}, |
1138 | {8116, 583}, |
1139 | {8117, 583}, |
1140 | {8118, 583}, |
1141 | {8119, 583}, |
1142 | {8120, 333}, |
1143 | {8121, 333}, |
1144 | {8122, 708}, |
1145 | {8123, 625}, |
1146 | {8124, 708}, |
1147 | {8125, 583}, |
1148 | {8126, 735}, |
1149 | {8127, 687}, |
1150 | {8128, 683}, |
1151 | {8129, 687}, |
1152 | {8130, 678}, |
1153 | {8131, 657}, |
1154 | {8132, 656}, |
1155 | {8133, 700}, |
1156 | {8134, 702}, |
1157 | {8135, 462}, |
1158 | {8136, 562}, |
1159 | {8137, 687}, |
1160 | {8138, 625}, |
1161 | {8139, 812}, |
1162 | {8140, 711}, |
1163 | {8141, 672}, |
1164 | {8142, 651}, |
1165 | {8143, 702}, |
1166 | {8144, 702}, |
1167 | {8145, 619}, |
1168 | {8146, 648}, |
1169 | {8147, 712}, |
1170 | {8148, 682}, |
1171 | {8149, 792}, |
1172 | {8150, 666}, |
1173 | {8151, 667}, |
1174 | {8152, 634}, |
1175 | {8153, 500}, |
1176 | {8154, 750}, |
1177 | {8155, 500}, |
1178 | {8156, 562}, |
1179 | {8157, 500}, |
1180 | {8158, 327}, |
1181 | {8159, 613}, |
1182 | {8160, 637}, |
1183 | {8161, 615}, |
1184 | {8162, 637}, |
1185 | {8163, 610}, |
1186 | {8164, 500}, |
1187 | {8165, 637}, |
1188 | {8166, 650}, |
1189 | {8167, 469}, |
1190 | {8168, 471}, |
1191 | {8169, 641}, |
1192 | {8170, 500}, |
1193 | {8171, 875}, |
1194 | {8172, 646}, |
1195 | {8173, 657}, |
1196 | {8174, 655}, |
1197 | {8175, 655}, |
1198 | {8176, 583}, |
1199 | {8177, 583}, |
1200 | {8178, 562}, |
1201 | {8179, 645}, |
1202 | {8180, 645}, |
1203 | {8181, 750}, |
1204 | {8182, 613}, |
1205 | {8183, 647}, |
1206 | {8184, 551}, |
1207 | {8185, 500}, |
1208 | {8186, 500}, |
1209 | {8187, 500}, |
1210 | {8188, 791}, |
1211 | {0xFFFF, 0} |
1212 | }; |
1213 | |
1214 | |
1215 | /*---------------------------------------------------------------------------*/ |
1216 | /*----- BatangChe Font ---------------------------------------------------------*/ |
1217 | |
1218 | |
1219 | static HPDF_STATUS |
1220 | DotumChe_Init (HPDF_FontDef fontdef) |
1221 | { |
1222 | HPDF_STATUS ret; |
1223 | |
1224 | HPDF_PTRACE ((" HPDF_FontDef_DotumChe_Init\n" )); |
1225 | |
1226 | fontdef->ascent = 858; |
1227 | fontdef->descent = -141; |
1228 | fontdef->cap_height = 679; |
1229 | fontdef->font_bbox = HPDF_ToBox(0, -150, 1000, 863); |
1230 | fontdef->flags = HPDF_FONT_SYMBOLIC + HPDF_FONT_FIXED_WIDTH; |
1231 | fontdef->italic_angle = 0; |
1232 | fontdef->stemv = 78; |
1233 | if ((ret = HPDF_CIDFontDef_AddWidth (fontdef, DotumChe_W_ARRAY)) != |
1234 | HPDF_OK) { |
1235 | return ret; |
1236 | } |
1237 | |
1238 | fontdef->type = HPDF_FONTDEF_TYPE_CID; |
1239 | fontdef->valid = HPDF_TRUE; |
1240 | |
1241 | return HPDF_OK; |
1242 | } |
1243 | |
1244 | |
1245 | static HPDF_STATUS |
1246 | DotumChe_Bold_Init (HPDF_FontDef fontdef) |
1247 | { |
1248 | HPDF_STATUS ret = DotumChe_Init (fontdef); |
1249 | |
1250 | if (ret != HPDF_OK) |
1251 | return ret; |
1252 | |
1253 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_FALSE); |
1254 | } |
1255 | |
1256 | |
1257 | static HPDF_STATUS |
1258 | DotumChe_Italic_Init (HPDF_FontDef fontdef) |
1259 | { |
1260 | HPDF_STATUS ret = DotumChe_Init (fontdef); |
1261 | |
1262 | if (ret != HPDF_OK) |
1263 | return ret; |
1264 | |
1265 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_FALSE, HPDF_TRUE); |
1266 | } |
1267 | |
1268 | static HPDF_STATUS |
1269 | DotumChe_BoldItalic_Init (HPDF_FontDef fontdef) |
1270 | { |
1271 | HPDF_STATUS ret = DotumChe_Init (fontdef); |
1272 | |
1273 | if (ret != HPDF_OK) |
1274 | return ret; |
1275 | |
1276 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_TRUE); |
1277 | } |
1278 | |
1279 | |
1280 | static HPDF_STATUS |
1281 | Dotum_Init (HPDF_FontDef fontdef) |
1282 | { |
1283 | HPDF_STATUS ret; |
1284 | |
1285 | HPDF_PTRACE ((" HPDF_FontDef_Dotum_Init\n" )); |
1286 | |
1287 | fontdef->ascent = 858; |
1288 | fontdef->descent = -141; |
1289 | fontdef->cap_height = 679; |
1290 | fontdef->font_bbox = HPDF_ToBox(0, -150, 1000, 863); |
1291 | fontdef->flags = HPDF_FONT_SYMBOLIC; |
1292 | fontdef->italic_angle = 0; |
1293 | fontdef->stemv = 78; |
1294 | if ((ret = HPDF_CIDFontDef_AddWidth (fontdef, Dotum_W_ARRAY)) != |
1295 | HPDF_OK) { |
1296 | return ret; |
1297 | } |
1298 | |
1299 | fontdef->type = HPDF_FONTDEF_TYPE_CID; |
1300 | fontdef->valid = HPDF_TRUE; |
1301 | |
1302 | return HPDF_OK; |
1303 | } |
1304 | |
1305 | |
1306 | static HPDF_STATUS |
1307 | Dotum_Bold_Init (HPDF_FontDef fontdef) |
1308 | { |
1309 | HPDF_STATUS ret = Dotum_Init (fontdef); |
1310 | |
1311 | if (ret != HPDF_OK) |
1312 | return ret; |
1313 | |
1314 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_FALSE); |
1315 | } |
1316 | |
1317 | |
1318 | static HPDF_STATUS |
1319 | Dotum_Italic_Init (HPDF_FontDef fontdef) |
1320 | { |
1321 | HPDF_STATUS ret = Dotum_Init (fontdef); |
1322 | |
1323 | if (ret != HPDF_OK) |
1324 | return ret; |
1325 | |
1326 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_FALSE, HPDF_TRUE); |
1327 | } |
1328 | |
1329 | static HPDF_STATUS |
1330 | Dotum_BoldItalic_Init (HPDF_FontDef fontdef) |
1331 | { |
1332 | HPDF_STATUS ret = Dotum_Init (fontdef); |
1333 | |
1334 | if (ret != HPDF_OK) |
1335 | return ret; |
1336 | |
1337 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_TRUE); |
1338 | } |
1339 | |
1340 | |
1341 | static HPDF_STATUS |
1342 | BatangChe_Init (HPDF_FontDef fontdef) |
1343 | { |
1344 | HPDF_STATUS ret; |
1345 | |
1346 | HPDF_PTRACE ((" HPDF_FontDef_BatangChe_Init\n" )); |
1347 | |
1348 | fontdef->ascent = 858; |
1349 | fontdef->descent = -141; |
1350 | fontdef->cap_height = 769; |
1351 | fontdef->font_bbox = HPDF_ToBox(-0, -154, 1000, 861); |
1352 | fontdef->flags = HPDF_FONT_SYMBOLIC + HPDF_FONT_FIXED_WIDTH + |
1353 | HPDF_FONT_SERIF; |
1354 | fontdef->italic_angle = 0; |
1355 | fontdef->stemv = 78; |
1356 | if ((ret = HPDF_CIDFontDef_AddWidth (fontdef, DotumChe_W_ARRAY)) != |
1357 | HPDF_OK) { |
1358 | return ret; |
1359 | } |
1360 | |
1361 | fontdef->type = HPDF_FONTDEF_TYPE_CID; |
1362 | fontdef->valid = HPDF_TRUE; |
1363 | |
1364 | return HPDF_OK; |
1365 | } |
1366 | |
1367 | |
1368 | static HPDF_STATUS |
1369 | BatangChe_Bold_Init (HPDF_FontDef fontdef) |
1370 | { |
1371 | HPDF_STATUS ret = BatangChe_Init (fontdef); |
1372 | |
1373 | if (ret != HPDF_OK) |
1374 | return ret; |
1375 | |
1376 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_FALSE); |
1377 | } |
1378 | |
1379 | |
1380 | static HPDF_STATUS |
1381 | BatangChe_Italic_Init (HPDF_FontDef fontdef) |
1382 | { |
1383 | HPDF_STATUS ret = BatangChe_Init (fontdef); |
1384 | |
1385 | if (ret != HPDF_OK) |
1386 | return ret; |
1387 | |
1388 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_FALSE, HPDF_TRUE); |
1389 | } |
1390 | |
1391 | static HPDF_STATUS |
1392 | BatangChe_BoldItalic_Init (HPDF_FontDef fontdef) |
1393 | { |
1394 | HPDF_STATUS ret = BatangChe_Init (fontdef); |
1395 | |
1396 | if (ret != HPDF_OK) |
1397 | return ret; |
1398 | |
1399 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_TRUE); |
1400 | } |
1401 | |
1402 | |
1403 | static HPDF_STATUS |
1404 | Batang_Init (HPDF_FontDef fontdef) |
1405 | { |
1406 | HPDF_STATUS ret; |
1407 | |
1408 | HPDF_PTRACE ((" HPDF_FontDef_Batang_Init\n" )); |
1409 | |
1410 | fontdef->ascent = 858; |
1411 | fontdef->descent = -141; |
1412 | fontdef->cap_height = 679; |
1413 | fontdef->font_bbox = HPDF_ToBox(0, -154, 1000, 861); |
1414 | fontdef->flags = HPDF_FONT_SYMBOLIC + HPDF_FONT_SERIF; |
1415 | fontdef->italic_angle = 0; |
1416 | fontdef->stemv = 78; |
1417 | if ((ret = HPDF_CIDFontDef_AddWidth (fontdef, Dotum_W_ARRAY)) != |
1418 | HPDF_OK) { |
1419 | return ret; |
1420 | } |
1421 | |
1422 | fontdef->type = HPDF_FONTDEF_TYPE_CID; |
1423 | fontdef->valid = HPDF_TRUE; |
1424 | |
1425 | return HPDF_OK; |
1426 | } |
1427 | |
1428 | |
1429 | static HPDF_STATUS |
1430 | Batang_Bold_Init (HPDF_FontDef fontdef) |
1431 | { |
1432 | HPDF_STATUS ret = Batang_Init (fontdef); |
1433 | |
1434 | if (ret != HPDF_OK) |
1435 | return ret; |
1436 | |
1437 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_FALSE); |
1438 | } |
1439 | |
1440 | |
1441 | static HPDF_STATUS |
1442 | Batang_Italic_Init (HPDF_FontDef fontdef) |
1443 | { |
1444 | HPDF_STATUS ret = Batang_Init (fontdef); |
1445 | |
1446 | if (ret != HPDF_OK) |
1447 | return ret; |
1448 | |
1449 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_FALSE, HPDF_TRUE); |
1450 | } |
1451 | |
1452 | static HPDF_STATUS |
1453 | Batang_BoldItalic_Init (HPDF_FontDef fontdef) |
1454 | { |
1455 | HPDF_STATUS ret = Batang_Init (fontdef); |
1456 | |
1457 | if (ret != HPDF_OK) |
1458 | return ret; |
1459 | |
1460 | return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_TRUE); |
1461 | } |
1462 | |
1463 | |
1464 | HPDF_EXPORT(HPDF_STATUS) |
1465 | HPDF_UseKRFonts (HPDF_Doc pdf) |
1466 | { |
1467 | HPDF_FontDef fontdef; |
1468 | HPDF_STATUS ret; |
1469 | |
1470 | if (!HPDF_HasDoc (pdf)) |
1471 | return HPDF_INVALID_DOCUMENT; |
1472 | |
1473 | /* DotumChe */ |
1474 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "DotumChe" , |
1475 | DotumChe_Init); |
1476 | |
1477 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1478 | return ret; |
1479 | |
1480 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "DotumChe,Bold" , |
1481 | DotumChe_Bold_Init); |
1482 | |
1483 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1484 | return ret; |
1485 | |
1486 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "DotumChe,Italic" , |
1487 | DotumChe_Italic_Init); |
1488 | |
1489 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1490 | return ret; |
1491 | |
1492 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "DotumChe,BoldItalic" , |
1493 | DotumChe_BoldItalic_Init); |
1494 | |
1495 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1496 | return ret; |
1497 | |
1498 | /* Dotum */ |
1499 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "Dotum" , |
1500 | Dotum_Init); |
1501 | |
1502 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1503 | return ret; |
1504 | |
1505 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "Dotum,Bold" , |
1506 | Dotum_Bold_Init); |
1507 | |
1508 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1509 | return ret; |
1510 | |
1511 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "Dotum,Italic" , |
1512 | Dotum_Italic_Init); |
1513 | |
1514 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1515 | return ret; |
1516 | |
1517 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "Dotum,BoldItalic" , |
1518 | Dotum_BoldItalic_Init); |
1519 | |
1520 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1521 | return ret; |
1522 | |
1523 | /* BatangChe */ |
1524 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "BatangChe" , |
1525 | BatangChe_Init); |
1526 | |
1527 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1528 | return ret; |
1529 | |
1530 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "BatangChe,Bold" , |
1531 | BatangChe_Bold_Init); |
1532 | |
1533 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1534 | return ret; |
1535 | |
1536 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "BatangChe,Italic" , |
1537 | BatangChe_Italic_Init); |
1538 | |
1539 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1540 | return ret; |
1541 | |
1542 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "BatangChe,BoldItalic" , |
1543 | BatangChe_BoldItalic_Init); |
1544 | |
1545 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1546 | return ret; |
1547 | |
1548 | /* Batang */ |
1549 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "Batang" , |
1550 | Batang_Init); |
1551 | |
1552 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1553 | return ret; |
1554 | |
1555 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "Batang,Bold" , |
1556 | Batang_Bold_Init); |
1557 | |
1558 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1559 | return ret; |
1560 | |
1561 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "Batang,Italic" , |
1562 | Batang_Italic_Init); |
1563 | |
1564 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1565 | return ret; |
1566 | |
1567 | fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "Batang,BoldItalic" , |
1568 | Batang_BoldItalic_Init); |
1569 | |
1570 | if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK) |
1571 | return ret; |
1572 | |
1573 | return HPDF_OK; |
1574 | } |
1575 | |
1576 | |