1/*
2 * << Haru Free PDF Library >> -- hpdf_fontdef_jp.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
24static const HPDF_CID_Width MS_Gothic_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 {231, 500},
121 {232, 500},
122 {233, 500},
123 {234, 500},
124 {235, 500},
125 {236, 500},
126 {237, 500},
127 {238, 500},
128 {239, 500},
129 {240, 500},
130 {241, 500},
131 {242, 500},
132 {243, 500},
133 {244, 500},
134 {245, 500},
135 {246, 500},
136 {247, 500},
137 {248, 500},
138 {249, 500},
139 {250, 500},
140 {251, 500},
141 {252, 500},
142 {253, 500},
143 {254, 500},
144 {255, 500},
145 {256, 500},
146 {257, 500},
147 {258, 500},
148 {259, 500},
149 {260, 500},
150 {261, 500},
151 {262, 500},
152 {263, 500},
153 {264, 500},
154 {265, 500},
155 {266, 500},
156 {267, 500},
157 {268, 500},
158 {269, 500},
159 {270, 500},
160 {271, 500},
161 {272, 500},
162 {273, 500},
163 {274, 500},
164 {275, 500},
165 {276, 500},
166 {277, 500},
167 {278, 500},
168 {279, 500},
169 {280, 500},
170 {281, 500},
171 {282, 500},
172 {283, 500},
173 {284, 500},
174 {285, 500},
175 {286, 500},
176 {287, 500},
177 {288, 500},
178 {289, 500},
179 {290, 500},
180 {291, 500},
181 {292, 500},
182 {293, 500},
183 {294, 500},
184 {295, 500},
185 {296, 500},
186 {297, 500},
187 {298, 500},
188 {299, 500},
189 {300, 500},
190 {301, 500},
191 {302, 500},
192 {303, 500},
193 {304, 500},
194 {305, 500},
195 {306, 500},
196 {307, 500},
197 {308, 500},
198 {309, 500},
199 {310, 500},
200 {311, 500},
201 {312, 500},
202 {313, 500},
203 {314, 500},
204 {315, 500},
205 {316, 500},
206 {317, 500},
207 {318, 500},
208 {319, 500},
209 {320, 500},
210 {321, 500},
211 {322, 500},
212 {323, 500},
213 {324, 500},
214 {327, 500},
215 {328, 500},
216 {329, 500},
217 {330, 500},
218 {331, 500},
219 {332, 500},
220 {333, 500},
221 {334, 500},
222 {335, 500},
223 {336, 500},
224 {337, 500},
225 {338, 500},
226 {339, 500},
227 {340, 500},
228 {341, 500},
229 {342, 500},
230 {343, 500},
231 {344, 500},
232 {345, 500},
233 {346, 500},
234 {347, 500},
235 {348, 500},
236 {349, 500},
237 {350, 500},
238 {351, 500},
239 {352, 500},
240 {353, 500},
241 {354, 500},
242 {355, 500},
243 {356, 500},
244 {357, 500},
245 {358, 500},
246 {359, 500},
247 {360, 500},
248 {361, 500},
249 {362, 500},
250 {363, 500},
251 {364, 500},
252 {365, 500},
253 {366, 500},
254 {367, 500},
255 {368, 500},
256 {369, 500},
257 {370, 500},
258 {371, 500},
259 {372, 500},
260 {373, 500},
261 {374, 500},
262 {375, 500},
263 {376, 500},
264 {377, 500},
265 {378, 500},
266 {379, 500},
267 {380, 500},
268 {381, 500},
269 {382, 500},
270 {383, 500},
271 {384, 500},
272 {385, 500},
273 {386, 500},
274 {387, 500},
275 {388, 500},
276 {389, 500},
277 {631, 500},
278 {0xFFFF, 0}
279};
280
281
282static const HPDF_CID_Width MS_PGothic_W_ARRAY[] = {
283 {1, 304},
284 {2, 218},
285 {3, 500},
286 {4, 500},
287 {5, 500},
288 {6, 500},
289 {7, 593},
290 {8, 203},
291 {9, 304},
292 {10, 304},
293 {11, 500},
294 {12, 500},
295 {13, 203},
296 {14, 500},
297 {15, 203},
298 {16, 500},
299 {17, 500},
300 {18, 500},
301 {19, 500},
302 {20, 500},
303 {21, 500},
304 {22, 500},
305 {23, 500},
306 {24, 500},
307 {25, 500},
308 {26, 500},
309 {27, 203},
310 {28, 203},
311 {29, 500},
312 {30, 500},
313 {31, 500},
314 {32, 453},
315 {33, 667},
316 {34, 632},
317 {35, 636},
318 {36, 664},
319 {37, 648},
320 {38, 566},
321 {39, 550},
322 {40, 679},
323 {41, 640},
324 {42, 246},
325 {43, 542},
326 {44, 597},
327 {45, 539},
328 {46, 742},
329 {47, 640},
330 {48, 707},
331 {49, 617},
332 {50, 707},
333 {51, 625},
334 {52, 601},
335 {53, 589},
336 {54, 640},
337 {55, 632},
338 {56, 742},
339 {57, 601},
340 {58, 589},
341 {59, 566},
342 {60, 335},
343 {61, 503},
344 {62, 335},
345 {63, 414},
346 {64, 304},
347 {65, 414},
348 {66, 476},
349 {67, 496},
350 {68, 500},
351 {69, 496},
352 {70, 500},
353 {71, 304},
354 {72, 460},
355 {73, 500},
356 {74, 210},
357 {75, 218},
358 {76, 460},
359 {77, 210},
360 {78, 734},
361 {79, 500},
362 {80, 507},
363 {81, 496},
364 {82, 496},
365 {83, 347},
366 {84, 460},
367 {85, 351},
368 {86, 500},
369 {87, 476},
370 {88, 648},
371 {89, 460},
372 {90, 476},
373 {91, 457},
374 {92, 234},
375 {93, 234},
376 {94, 234},
377 {95, 414},
378 {231, 304},
379 {232, 218},
380 {233, 500},
381 {234, 500},
382 {235, 500},
383 {236, 500},
384 {237, 593},
385 {238, 203},
386 {239, 304},
387 {240, 304},
388 {241, 500},
389 {242, 500},
390 {243, 203},
391 {244, 500},
392 {245, 203},
393 {246, 500},
394 {247, 500},
395 {248, 500},
396 {249, 500},
397 {250, 500},
398 {251, 500},
399 {252, 500},
400 {253, 500},
401 {254, 500},
402 {255, 500},
403 {256, 500},
404 {257, 203},
405 {258, 203},
406 {259, 500},
407 {260, 500},
408 {261, 500},
409 {262, 453},
410 {263, 667},
411 {264, 632},
412 {265, 636},
413 {266, 664},
414 {267, 648},
415 {268, 566},
416 {269, 550},
417 {270, 679},
418 {271, 640},
419 {272, 246},
420 {273, 542},
421 {274, 597},
422 {275, 539},
423 {276, 742},
424 {277, 640},
425 {278, 707},
426 {279, 617},
427 {280, 707},
428 {281, 625},
429 {282, 601},
430 {283, 589},
431 {284, 640},
432 {285, 632},
433 {286, 742},
434 {287, 601},
435 {288, 589},
436 {289, 566},
437 {290, 335},
438 {291, 503},
439 {292, 335},
440 {293, 414},
441 {294, 304},
442 {295, 414},
443 {296, 476},
444 {297, 496},
445 {298, 500},
446 {299, 496},
447 {300, 500},
448 {301, 304},
449 {302, 460},
450 {303, 500},
451 {304, 210},
452 {305, 218},
453 {306, 460},
454 {307, 210},
455 {308, 734},
456 {309, 500},
457 {310, 507},
458 {311, 496},
459 {312, 496},
460 {313, 347},
461 {314, 460},
462 {315, 351},
463 {316, 500},
464 {317, 476},
465 {318, 648},
466 {319, 460},
467 {320, 476},
468 {321, 457},
469 {322, 234},
470 {323, 234},
471 {324, 234},
472 {327, 441},
473 {328, 441},
474 {329, 441},
475 {330, 441},
476 {331, 441},
477 {332, 546},
478 {333, 523},
479 {334, 445},
480 {335, 480},
481 {336, 468},
482 {337, 515},
483 {338, 523},
484 {339, 503},
485 {340, 437},
486 {341, 500},
487 {342, 640},
488 {343, 617},
489 {344, 566},
490 {345, 625},
491 {346, 597},
492 {347, 636},
493 {348, 562},
494 {349, 652},
495 {350, 539},
496 {351, 621},
497 {352, 523},
498 {353, 664},
499 {354, 589},
500 {355, 636},
501 {356, 644},
502 {357, 554},
503 {358, 527},
504 {359, 601},
505 {360, 601},
506 {361, 601},
507 {362, 460},
508 {363, 644},
509 {364, 597},
510 {365, 578},
511 {366, 648},
512 {367, 492},
513 {368, 636},
514 {369, 515},
515 {370, 546},
516 {371, 613},
517 {372, 640},
518 {373, 605},
519 {374, 453},
520 {375, 660},
521 {376, 507},
522 {377, 609},
523 {378, 664},
524 {379, 640},
525 {380, 519},
526 {381, 558},
527 {382, 511},
528 {383, 656},
529 {384, 566},
530 {385, 558},
531 {386, 589},
532 {387, 562},
533 {388, 250},
534 {389, 230},
535 {631, 414},
536 {633, 664},
537 {634, 664},
538 {635, 664},
539 {636, 664},
540 {637, 664},
541 {638, 500},
542 {639, 500},
543 {640, 500},
544 {643, 500},
545 {644, 500},
546 {645, 500},
547 {646, 500},
548 {647, 500},
549 {648, 500},
550 {651, 746},
551 {652, 746},
552 {653, 734},
553 {654, 699},
554 {660, 960},
555 {662, 500},
556 {670, 500},
557 {671, 500},
558 {672, 500},
559 {673, 500},
560 {674, 500},
561 {675, 500},
562 {676, 500},
563 {677, 500},
564 {678, 500},
565 {679, 500},
566 {680, 500},
567 {681, 500},
568 {682, 500},
569 {683, 500},
570 {684, 500},
571 {685, 500},
572 {686, 500},
573 {687, 500},
574 {688, 500},
575 {689, 500},
576 {690, 500},
577 {691, 500},
578 {776, 500},
579 {777, 500},
580 {778, 500},
581 {780, 683},
582 {781, 683},
583 {782, 683},
584 {783, 683},
585 {784, 683},
586 {785, 683},
587 {786, 683},
588 {787, 683},
589 {788, 683},
590 {789, 683},
591 {790, 714},
592 {791, 777},
593 {792, 742},
594 {793, 757},
595 {794, 710},
596 {795, 632},
597 {796, 773},
598 {797, 769},
599 {798, 273},
600 {799, 605},
601 {800, 753},
602 {801, 628},
603 {802, 933},
604 {803, 769},
605 {804, 804},
606 {805, 710},
607 {806, 804},
608 {807, 757},
609 {808, 742},
610 {809, 617},
611 {810, 769},
612 {811, 714},
613 {812, 980},
614 {813, 652},
615 {814, 648},
616 {815, 648},
617 {816, 574},
618 {817, 601},
619 {818, 562},
620 {819, 601},
621 {820, 562},
622 {821, 296},
623 {822, 578},
624 {823, 621},
625 {824, 250},
626 {825, 250},
627 {826, 593},
628 {827, 250},
629 {828, 937},
630 {829, 621},
631 {830, 605},
632 {831, 605},
633 {832, 601},
634 {833, 378},
635 {834, 570},
636 {835, 335},
637 {836, 621},
638 {837, 511},
639 {838, 777},
640 {839, 519},
641 {840, 496},
642 {841, 507},
643 {842, 746},
644 {843, 941},
645 {844, 804},
646 {845, 945},
647 {846, 601},
648 {847, 707},
649 {848, 750},
650 {849, 902},
651 {850, 804},
652 {851, 945},
653 {854, 843},
654 {855, 902},
655 {856, 589},
656 {857, 816},
657 {858, 945},
658 {859, 980},
659 {860, 796},
660 {861, 894},
661 {862, 765},
662 {863, 882},
663 {864, 765},
664 {865, 765},
665 {866, 960},
666 {867, 980},
667 {870, 921},
668 {871, 960},
669 {872, 921},
670 {873, 921},
671 {874, 863},
672 {875, 902},
673 {876, 804},
674 {877, 953},
675 {878, 957},
676 {879, 902},
677 {880, 902},
678 {881, 765},
679 {882, 882},
680 {883, 902},
681 {884, 941},
682 {891, 960},
683 {892, 960},
684 {893, 960},
685 {903, 890},
686 {905, 980},
687 {906, 980},
688 {907, 804},
689 {908, 843},
690 {910, 843},
691 {911, 980},
692 {912, 726},
693 {913, 863},
694 {914, 804},
695 {915, 746},
696 {916, 863},
697 {918, 843},
698 {919, 863},
699 {923, 855},
700 {924, 960},
701 {925, 757},
702 {926, 898},
703 {927, 652},
704 {928, 824},
705 {929, 753},
706 {930, 941},
707 {931, 742},
708 {932, 894},
709 {933, 808},
710 {934, 933},
711 {935, 824},
712 {936, 921},
713 {937, 960},
714 {938, 964},
715 {939, 804},
716 {940, 941},
717 {941, 929},
718 {942, 960},
719 {943, 796},
720 {944, 890},
721 {947, 898},
722 {948, 898},
723 {949, 902},
724 {950, 964},
725 {951, 914},
726 {952, 980},
727 {953, 804},
728 {954, 882},
729 {955, 765},
730 {956, 921},
731 {957, 910},
732 {958, 960},
733 {959, 734},
734 {960, 863},
735 {961, 921},
736 {962, 886},
737 {963, 960},
738 {964, 648},
739 {965, 707},
740 {966, 941},
741 {967, 910},
742 {968, 824},
743 {969, 929},
744 {970, 707},
745 {974, 765},
746 {975, 863},
747 {976, 863},
748 {977, 804},
749 {978, 882},
750 {979, 882},
751 {980, 945},
752 {981, 945},
753 {982, 945},
754 {983, 921},
755 {984, 953},
756 {985, 953},
757 {986, 902},
758 {987, 667},
759 {988, 976},
760 {989, 718},
761 {990, 898},
762 {991, 804},
763 {992, 980},
764 {993, 812},
765 {994, 960},
766 {995, 628},
767 {996, 726},
768 {997, 808},
769 {998, 746},
770 {1000, 851},
771 {1001, 863},
772 {1002, 765},
773 {1003, 941},
774 {1006, 804},
775 {1007, 863},
776 {1008, 960},
777 {1009, 726},
778 {1010, 777},
779 {0xFFFF, 0}
780};
781
782
783static const HPDF_CID_Width MS_Mincho_W_ARRAY[] = {
784 {1, 500},
785 {2, 500},
786 {3, 500},
787 {4, 500},
788 {5, 500},
789 {6, 500},
790 {7, 500},
791 {8, 500},
792 {9, 500},
793 {10, 500},
794 {11, 500},
795 {12, 500},
796 {13, 500},
797 {14, 500},
798 {15, 500},
799 {16, 500},
800 {17, 500},
801 {18, 500},
802 {19, 500},
803 {20, 500},
804 {21, 500},
805 {22, 500},
806 {23, 500},
807 {24, 500},
808 {25, 500},
809 {26, 500},
810 {27, 500},
811 {28, 500},
812 {29, 500},
813 {30, 500},
814 {31, 500},
815 {32, 500},
816 {33, 500},
817 {34, 500},
818 {35, 500},
819 {36, 500},
820 {37, 500},
821 {38, 500},
822 {39, 500},
823 {40, 500},
824 {41, 500},
825 {42, 500},
826 {43, 500},
827 {44, 500},
828 {45, 500},
829 {46, 500},
830 {47, 500},
831 {48, 500},
832 {49, 500},
833 {50, 500},
834 {51, 500},
835 {52, 500},
836 {53, 500},
837 {54, 500},
838 {55, 500},
839 {56, 500},
840 {57, 500},
841 {58, 500},
842 {59, 500},
843 {60, 500},
844 {61, 500},
845 {62, 500},
846 {63, 500},
847 {64, 500},
848 {65, 500},
849 {66, 500},
850 {67, 500},
851 {68, 500},
852 {69, 500},
853 {70, 500},
854 {71, 500},
855 {72, 500},
856 {73, 500},
857 {74, 500},
858 {75, 500},
859 {76, 500},
860 {77, 500},
861 {78, 500},
862 {79, 500},
863 {80, 500},
864 {81, 500},
865 {82, 500},
866 {83, 500},
867 {84, 500},
868 {85, 500},
869 {86, 500},
870 {87, 500},
871 {88, 500},
872 {89, 500},
873 {90, 500},
874 {91, 500},
875 {92, 500},
876 {93, 500},
877 {94, 500},
878 {95, 500},
879 {231, 500},
880 {232, 500},
881 {233, 500},
882 {234, 500},
883 {235, 500},
884 {236, 500},
885 {237, 500},
886 {238, 500},
887 {239, 500},
888 {240, 500},
889 {241, 500},
890 {242, 500},
891 {243, 500},
892 {244, 500},
893 {245, 500},
894 {246, 500},
895 {247, 500},
896 {248, 500},
897 {249, 500},
898 {250, 500},
899 {251, 500},
900 {252, 500},
901 {253, 500},
902 {254, 500},
903 {255, 500},
904 {256, 500},
905 {257, 500},
906 {258, 500},
907 {259, 500},
908 {260, 500},
909 {261, 500},
910 {262, 500},
911 {263, 500},
912 {264, 500},
913 {265, 500},
914 {266, 500},
915 {267, 500},
916 {268, 500},
917 {269, 500},
918 {270, 500},
919 {271, 500},
920 {272, 500},
921 {273, 500},
922 {274, 500},
923 {275, 500},
924 {276, 500},
925 {277, 500},
926 {278, 500},
927 {279, 500},
928 {280, 500},
929 {281, 500},
930 {282, 500},
931 {283, 500},
932 {284, 500},
933 {285, 500},
934 {286, 500},
935 {287, 500},
936 {288, 500},
937 {289, 500},
938 {290, 500},
939 {291, 500},
940 {292, 500},
941 {293, 500},
942 {294, 500},
943 {295, 500},
944 {296, 500},
945 {297, 500},
946 {298, 500},
947 {299, 500},
948 {300, 500},
949 {301, 500},
950 {302, 500},
951 {303, 500},
952 {304, 500},
953 {305, 500},
954 {306, 500},
955 {307, 500},
956 {308, 500},
957 {309, 500},
958 {310, 500},
959 {311, 500},
960 {312, 500},
961 {313, 500},
962 {314, 500},
963 {315, 500},
964 {316, 500},
965 {317, 500},
966 {318, 500},
967 {319, 500},
968 {320, 500},
969 {321, 500},
970 {322, 500},
971 {323, 500},
972 {324, 500},
973 {327, 500},
974 {328, 500},
975 {329, 500},
976 {330, 500},
977 {331, 500},
978 {332, 500},
979 {333, 500},
980 {334, 500},
981 {335, 500},
982 {336, 500},
983 {337, 500},
984 {338, 500},
985 {339, 500},
986 {340, 500},
987 {341, 500},
988 {342, 500},
989 {343, 500},
990 {344, 500},
991 {345, 500},
992 {346, 500},
993 {347, 500},
994 {348, 500},
995 {349, 500},
996 {350, 500},
997 {351, 500},
998 {352, 500},
999 {353, 500},
1000 {354, 500},
1001 {355, 500},
1002 {356, 500},
1003 {357, 500},
1004 {358, 500},
1005 {359, 500},
1006 {360, 500},
1007 {361, 500},
1008 {362, 500},
1009 {363, 500},
1010 {364, 500},
1011 {365, 500},
1012 {366, 500},
1013 {367, 500},
1014 {368, 500},
1015 {369, 500},
1016 {370, 500},
1017 {371, 500},
1018 {372, 500},
1019 {373, 500},
1020 {374, 500},
1021 {375, 500},
1022 {376, 500},
1023 {377, 500},
1024 {378, 500},
1025 {379, 500},
1026 {380, 500},
1027 {381, 500},
1028 {382, 500},
1029 {383, 500},
1030 {384, 500},
1031 {385, 500},
1032 {386, 500},
1033 {387, 500},
1034 {388, 500},
1035 {389, 500},
1036 {631, 500},
1037 {0xFFFF, 0}
1038};
1039
1040
1041
1042static const HPDF_CID_Width MS_PMincho_W_ARRAY[] = {
1043 {1, 304},
1044 {2, 304},
1045 {3, 460},
1046 {4, 500},
1047 {5, 500},
1048 {6, 500},
1049 {7, 613},
1050 {8, 304},
1051 {9, 304},
1052 {10, 304},
1053 {11, 500},
1054 {12, 500},
1055 {13, 304},
1056 {14, 500},
1057 {15, 304},
1058 {16, 500},
1059 {17, 500},
1060 {18, 500},
1061 {19, 500},
1062 {20, 500},
1063 {21, 500},
1064 {22, 500},
1065 {23, 500},
1066 {24, 500},
1067 {25, 500},
1068 {26, 500},
1069 {27, 304},
1070 {28, 304},
1071 {29, 500},
1072 {30, 500},
1073 {31, 500},
1074 {32, 500},
1075 {33, 726},
1076 {34, 664},
1077 {35, 621},
1078 {36, 699},
1079 {37, 691},
1080 {38, 597},
1081 {39, 597},
1082 {40, 710},
1083 {41, 722},
1084 {42, 289},
1085 {43, 386},
1086 {44, 667},
1087 {45, 585},
1088 {46, 800},
1089 {47, 664},
1090 {48, 765},
1091 {49, 562},
1092 {50, 765},
1093 {51, 601},
1094 {52, 503},
1095 {53, 625},
1096 {54, 691},
1097 {55, 664},
1098 {56, 871},
1099 {57, 656},
1100 {58, 625},
1101 {59, 562},
1102 {60, 332},
1103 {61, 500},
1104 {62, 332},
1105 {63, 304},
1106 {64, 304},
1107 {65, 304},
1108 {66, 453},
1109 {67, 500},
1110 {68, 464},
1111 {69, 500},
1112 {70, 472},
1113 {71, 253},
1114 {72, 472},
1115 {73, 500},
1116 {74, 242},
1117 {75, 242},
1118 {76, 492},
1119 {77, 242},
1120 {78, 703},
1121 {79, 500},
1122 {80, 500},
1123 {81, 500},
1124 {82, 500},
1125 {83, 367},
1126 {84, 414},
1127 {85, 351},
1128 {86, 500},
1129 {87, 476},
1130 {88, 601},
1131 {89, 468},
1132 {90, 476},
1133 {91, 453},
1134 {92, 242},
1135 {93, 218},
1136 {94, 242},
1137 {95, 500},
1138 {231, 304},
1139 {232, 304},
1140 {233, 460},
1141 {234, 500},
1142 {235, 500},
1143 {236, 500},
1144 {237, 613},
1145 {238, 304},
1146 {239, 304},
1147 {240, 304},
1148 {241, 500},
1149 {242, 500},
1150 {243, 304},
1151 {244, 500},
1152 {245, 304},
1153 {246, 500},
1154 {247, 500},
1155 {248, 500},
1156 {249, 500},
1157 {250, 500},
1158 {251, 500},
1159 {252, 500},
1160 {253, 500},
1161 {254, 500},
1162 {255, 500},
1163 {256, 500},
1164 {257, 304},
1165 {258, 304},
1166 {259, 500},
1167 {260, 500},
1168 {261, 500},
1169 {262, 500},
1170 {263, 726},
1171 {264, 664},
1172 {265, 621},
1173 {266, 699},
1174 {267, 691},
1175 {268, 597},
1176 {269, 597},
1177 {270, 710},
1178 {271, 722},
1179 {272, 289},
1180 {273, 386},
1181 {274, 667},
1182 {275, 585},
1183 {276, 800},
1184 {277, 664},
1185 {278, 765},
1186 {279, 562},
1187 {280, 765},
1188 {281, 601},
1189 {282, 503},
1190 {283, 625},
1191 {284, 691},
1192 {285, 664},
1193 {286, 871},
1194 {287, 656},
1195 {288, 625},
1196 {289, 562},
1197 {290, 332},
1198 {291, 500},
1199 {292, 332},
1200 {293, 304},
1201 {294, 304},
1202 {295, 304},
1203 {296, 453},
1204 {297, 500},
1205 {298, 464},
1206 {299, 500},
1207 {300, 472},
1208 {301, 253},
1209 {302, 472},
1210 {303, 500},
1211 {304, 242},
1212 {305, 242},
1213 {306, 492},
1214 {307, 242},
1215 {308, 703},
1216 {309, 500},
1217 {310, 500},
1218 {311, 500},
1219 {312, 500},
1220 {313, 367},
1221 {314, 414},
1222 {315, 351},
1223 {316, 500},
1224 {317, 476},
1225 {318, 601},
1226 {319, 468},
1227 {320, 476},
1228 {321, 453},
1229 {322, 242},
1230 {323, 218},
1231 {324, 242},
1232 {327, 437},
1233 {328, 437},
1234 {329, 437},
1235 {330, 437},
1236 {331, 437},
1237 {332, 574},
1238 {333, 527},
1239 {334, 480},
1240 {335, 484},
1241 {336, 523},
1242 {337, 570},
1243 {338, 531},
1244 {339, 550},
1245 {340, 437},
1246 {341, 531},
1247 {342, 664},
1248 {343, 613},
1249 {344, 585},
1250 {345, 550},
1251 {346, 648},
1252 {347, 652},
1253 {348, 589},
1254 {349, 597},
1255 {350, 535},
1256 {351, 625},
1257 {352, 539},
1258 {353, 652},
1259 {354, 652},
1260 {355, 593},
1261 {356, 648},
1262 {357, 539},
1263 {358, 574},
1264 {359, 636},
1265 {360, 585},
1266 {361, 636},
1267 {362, 453},
1268 {363, 664},
1269 {364, 625},
1270 {365, 593},
1271 {366, 648},
1272 {367, 535},
1273 {368, 664},
1274 {369, 523},
1275 {370, 597},
1276 {371, 664},
1277 {372, 613},
1278 {373, 648},
1279 {374, 449},
1280 {375, 625},
1281 {376, 531},
1282 {377, 648},
1283 {378, 636},
1284 {379, 648},
1285 {380, 554},
1286 {381, 574},
1287 {382, 468},
1288 {383, 664},
1289 {384, 589},
1290 {385, 574},
1291 {386, 597},
1292 {387, 613},
1293 {388, 238},
1294 {389, 226},
1295 {631, 500},
1296 {633, 664},
1297 {634, 664},
1298 {635, 664},
1299 {636, 664},
1300 {637, 664},
1301 {638, 500},
1302 {639, 500},
1303 {640, 500},
1304 {643, 500},
1305 {644, 500},
1306 {645, 500},
1307 {646, 500},
1308 {647, 500},
1309 {648, 500},
1310 {651, 648},
1311 {652, 800},
1312 {653, 652},
1313 {654, 703},
1314 {662, 500},
1315 {670, 500},
1316 {671, 500},
1317 {672, 500},
1318 {673, 500},
1319 {674, 500},
1320 {675, 500},
1321 {676, 500},
1322 {677, 500},
1323 {678, 500},
1324 {679, 500},
1325 {680, 500},
1326 {681, 500},
1327 {682, 500},
1328 {683, 500},
1329 {684, 500},
1330 {685, 500},
1331 {686, 500},
1332 {687, 500},
1333 {688, 500},
1334 {689, 500},
1335 {690, 500},
1336 {691, 500},
1337 {776, 500},
1338 {777, 500},
1339 {778, 500},
1340 {780, 621},
1341 {781, 621},
1342 {782, 621},
1343 {783, 621},
1344 {784, 621},
1345 {785, 621},
1346 {786, 621},
1347 {787, 621},
1348 {788, 621},
1349 {789, 621},
1350 {790, 804},
1351 {791, 714},
1352 {792, 761},
1353 {793, 812},
1354 {794, 718},
1355 {795, 687},
1356 {796, 800},
1357 {797, 859},
1358 {798, 359},
1359 {799, 359},
1360 {800, 804},
1361 {801, 675},
1362 {803, 835},
1363 {804, 832},
1364 {805, 679},
1365 {806, 832},
1366 {807, 726},
1367 {808, 687},
1368 {809, 718},
1369 {810, 855},
1370 {811, 769},
1371 {812, 976},
1372 {813, 730},
1373 {814, 777},
1374 {815, 656},
1375 {816, 531},
1376 {817, 574},
1377 {818, 531},
1378 {819, 574},
1379 {820, 542},
1380 {821, 386},
1381 {822, 558},
1382 {823, 613},
1383 {824, 292},
1384 {825, 292},
1385 {826, 570},
1386 {827, 292},
1387 {828, 875},
1388 {829, 613},
1389 {830, 574},
1390 {831, 574},
1391 {832, 574},
1392 {833, 414},
1393 {834, 468},
1394 {835, 421},
1395 {836, 613},
1396 {837, 542},
1397 {838, 781},
1398 {839, 574},
1399 {840, 562},
1400 {841, 500},
1401 {842, 753},
1402 {843, 882},
1403 {844, 750},
1404 {845, 953},
1405 {846, 507},
1406 {847, 617},
1407 {848, 703},
1408 {849, 898},
1409 {850, 800},
1410 {852, 945},
1411 {853, 949},
1412 {854, 792},
1413 {855, 894},
1414 {856, 644},
1415 {857, 804},
1416 {858, 914},
1417 {859, 980},
1418 {860, 753},
1419 {861, 867},
1420 {862, 753},
1421 {863, 882},
1422 {864, 777},
1423 {865, 777},
1424 {870, 921},
1425 {871, 960},
1426 {872, 906},
1427 {873, 949},
1428 {874, 902},
1429 {875, 902},
1430 {876, 855},
1431 {879, 902},
1432 {880, 941},
1433 {881, 703},
1434 {882, 843},
1435 {883, 902},
1436 {884, 949},
1437 {887, 949},
1438 {888, 968},
1439 {900, 945},
1440 {901, 980},
1441 {902, 980},
1442 {903, 824},
1443 {906, 953},
1444 {907, 757},
1445 {908, 875},
1446 {910, 835},
1447 {911, 933},
1448 {912, 687},
1449 {913, 785},
1450 {914, 765},
1451 {915, 640},
1452 {916, 792},
1453 {917, 984},
1454 {918, 863},
1455 {919, 800},
1456 {920, 953},
1457 {921, 945},
1458 {922, 984},
1459 {923, 855},
1460 {924, 945},
1461 {925, 750},
1462 {926, 890},
1463 {927, 667},
1464 {928, 777},
1465 {929, 707},
1466 {930, 800},
1467 {931, 804},
1468 {932, 941},
1469 {933, 808},
1470 {934, 941},
1471 {935, 878},
1472 {936, 925},
1473 {937, 886},
1474 {938, 902},
1475 {939, 746},
1476 {940, 882},
1477 {941, 882},
1478 {942, 933},
1479 {943, 792},
1480 {944, 863},
1481 {945, 953},
1482 {946, 960},
1483 {947, 902},
1484 {948, 902},
1485 {949, 820},
1486 {950, 902},
1487 {951, 929},
1488 {952, 949},
1489 {953, 753},
1490 {954, 855},
1491 {955, 785},
1492 {956, 910},
1493 {957, 964},
1494 {958, 945},
1495 {959, 734},
1496 {960, 847},
1497 {961, 921},
1498 {962, 902},
1499 {964, 589},
1500 {965, 707},
1501 {966, 972},
1502 {967, 910},
1503 {968, 804},
1504 {969, 921},
1505 {970, 699},
1506 {971, 976},
1507 {972, 976},
1508 {973, 976},
1509 {974, 656},
1510 {975, 851},
1511 {976, 843},
1512 {977, 843},
1513 {978, 945},
1514 {979, 945},
1515 {983, 882},
1516 {984, 921},
1517 {985, 921},
1518 {986, 929},
1519 {987, 609},
1520 {988, 863},
1521 {989, 675},
1522 {990, 941},
1523 {991, 789},
1524 {992, 925},
1525 {993, 792},
1526 {994, 941},
1527 {995, 597},
1528 {996, 703},
1529 {997, 765},
1530 {998, 609},
1531 {999, 980},
1532 {1000, 832},
1533 {1001, 785},
1534 {1002, 699},
1535 {1003, 804},
1536 {1004, 964},
1537 {1005, 960},
1538 {1006, 785},
1539 {1007, 863},
1540 {1008, 882},
1541 {1009, 695},
1542 {1010, 765},
1543 {0xFFFF, 0}
1544};
1545
1546
1547/*---------------------------------------------------------------------------*/
1548/*----- Mincho Font ---------------------------------------------------------*/
1549
1550
1551static HPDF_STATUS
1552MS_Gothic_Init (HPDF_FontDef fontdef)
1553{
1554 HPDF_STATUS ret;
1555
1556 HPDF_PTRACE ((" HPDF_FontDef_MS_Gothic_Init\n"));
1557
1558 fontdef->ascent = 859;
1559 fontdef->descent = -140;
1560 fontdef->cap_height = 769;
1561 fontdef->font_bbox = HPDF_ToBox(-0, -136, 1000, 859);
1562 fontdef->flags = HPDF_FONT_SYMBOLIC + HPDF_FONT_FIXED_WIDTH;
1563 fontdef->italic_angle = 0;
1564 fontdef->stemv = 78;
1565 if ((ret = HPDF_CIDFontDef_AddWidth (fontdef, MS_Gothic_W_ARRAY)) !=
1566 HPDF_OK) {
1567 return ret;
1568 }
1569
1570 fontdef->type = HPDF_FONTDEF_TYPE_CID;
1571 fontdef->valid = HPDF_TRUE;
1572
1573 return HPDF_OK;
1574}
1575
1576
1577static HPDF_STATUS
1578MS_Gothic_Bold_Init (HPDF_FontDef fontdef)
1579{
1580 HPDF_STATUS ret = MS_Gothic_Init (fontdef);
1581
1582 if (ret != HPDF_OK)
1583 return ret;
1584
1585 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_FALSE);
1586}
1587
1588
1589static HPDF_STATUS
1590MS_Gothic_Italic_Init (HPDF_FontDef fontdef)
1591{
1592 HPDF_STATUS ret = MS_Gothic_Init (fontdef);
1593
1594 if (ret != HPDF_OK)
1595 return ret;
1596
1597 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_FALSE, HPDF_TRUE);
1598}
1599
1600static HPDF_STATUS
1601MS_Gothic_BoldItalic_Init (HPDF_FontDef fontdef)
1602{
1603 HPDF_STATUS ret = MS_Gothic_Init (fontdef);
1604
1605 if (ret != HPDF_OK)
1606 return ret;
1607
1608 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_TRUE);
1609}
1610
1611
1612static HPDF_STATUS
1613MS_PGothic_Init (HPDF_FontDef fontdef)
1614{
1615 HPDF_STATUS ret;
1616
1617 HPDF_PTRACE ((" HPDF_FontDef_MS_PGothic_Init\n"));
1618
1619 fontdef->ascent = 859;
1620 fontdef->descent = -140;
1621 fontdef->cap_height = 679;
1622 fontdef->font_bbox = HPDF_ToBox(-121, -136, 996, 859);
1623 fontdef->flags = HPDF_FONT_SYMBOLIC;
1624 fontdef->italic_angle = 0;
1625 fontdef->stemv = 78;
1626 if ((ret = HPDF_CIDFontDef_AddWidth (fontdef, MS_PGothic_W_ARRAY)) !=
1627 HPDF_OK) {
1628 return ret;
1629 }
1630
1631 fontdef->type = HPDF_FONTDEF_TYPE_CID;
1632 fontdef->valid = HPDF_TRUE;
1633
1634 return HPDF_OK;
1635}
1636
1637
1638static HPDF_STATUS
1639MS_PGothic_Bold_Init (HPDF_FontDef fontdef)
1640{
1641 HPDF_STATUS ret = MS_PGothic_Init (fontdef);
1642
1643 if (ret != HPDF_OK)
1644 return ret;
1645
1646 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_FALSE);
1647}
1648
1649
1650static HPDF_STATUS
1651MS_PGothic_Italic_Init (HPDF_FontDef fontdef)
1652{
1653 HPDF_STATUS ret = MS_PGothic_Init (fontdef);
1654
1655 if (ret != HPDF_OK)
1656 return ret;
1657
1658 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_FALSE, HPDF_TRUE);
1659}
1660
1661static HPDF_STATUS
1662MS_PGothic_BoldItalic_Init (HPDF_FontDef fontdef)
1663{
1664 HPDF_STATUS ret = MS_PGothic_Init (fontdef);
1665
1666 if (ret != HPDF_OK)
1667 return ret;
1668
1669 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_TRUE);
1670}
1671
1672
1673static HPDF_STATUS
1674MS_Mincho_Init (HPDF_FontDef fontdef)
1675{
1676 HPDF_STATUS ret;
1677
1678 HPDF_PTRACE ((" HPDF_FontDef_MS_Mincho_Init\n"));
1679
1680 fontdef->ascent = 859;
1681 fontdef->descent = -140;
1682 fontdef->cap_height = 769;
1683 fontdef->font_bbox = HPDF_ToBox(-0, -136, 1000, 859);
1684 fontdef->flags = HPDF_FONT_SYMBOLIC + HPDF_FONT_FIXED_WIDTH +
1685 HPDF_FONT_SERIF;
1686 fontdef->italic_angle = 0;
1687 fontdef->stemv = 78;
1688 if ((ret = HPDF_CIDFontDef_AddWidth (fontdef, MS_Gothic_W_ARRAY)) !=
1689 HPDF_OK) {
1690 return ret;
1691 }
1692
1693 fontdef->type = HPDF_FONTDEF_TYPE_CID;
1694 fontdef->valid = HPDF_TRUE;
1695
1696 return HPDF_OK;
1697}
1698
1699
1700static HPDF_STATUS
1701MS_Mincho_Bold_Init (HPDF_FontDef fontdef)
1702{
1703 HPDF_STATUS ret = MS_Mincho_Init (fontdef);
1704
1705 if (ret != HPDF_OK)
1706 return ret;
1707
1708 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_FALSE);
1709}
1710
1711
1712static HPDF_STATUS
1713MS_Mincho_Italic_Init (HPDF_FontDef fontdef)
1714{
1715 HPDF_STATUS ret = MS_Mincho_Init (fontdef);
1716
1717 if (ret != HPDF_OK)
1718 return ret;
1719
1720 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_FALSE, HPDF_TRUE);
1721}
1722
1723static HPDF_STATUS
1724MS_Mincho_BoldItalic_Init (HPDF_FontDef fontdef)
1725{
1726 HPDF_STATUS ret = MS_Mincho_Init (fontdef);
1727
1728 if (ret != HPDF_OK)
1729 return ret;
1730
1731 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_TRUE);
1732}
1733
1734
1735static HPDF_STATUS
1736MS_PMincho_Init (HPDF_FontDef fontdef)
1737{
1738 HPDF_STATUS ret;
1739
1740 HPDF_PTRACE ((" HPDF_FontDef_MS_PMincho_Init\n"));
1741
1742 fontdef->ascent = 859;
1743 fontdef->descent = -140;
1744 fontdef->cap_height = 679;
1745 fontdef->font_bbox = HPDF_ToBox(-82, -136, 996, 859);
1746 fontdef->flags = HPDF_FONT_SYMBOLIC + HPDF_FONT_SERIF;
1747 fontdef->italic_angle = 0;
1748 fontdef->stemv = 78;
1749 if ((ret = HPDF_CIDFontDef_AddWidth (fontdef, MS_PGothic_W_ARRAY)) !=
1750 HPDF_OK) {
1751 return ret;
1752 }
1753
1754 fontdef->type = HPDF_FONTDEF_TYPE_CID;
1755 fontdef->valid = HPDF_TRUE;
1756
1757 return HPDF_OK;
1758}
1759
1760
1761static HPDF_STATUS
1762MS_PMincho_Bold_Init (HPDF_FontDef fontdef)
1763{
1764 HPDF_STATUS ret = MS_PMincho_Init (fontdef);
1765
1766 if (ret != HPDF_OK)
1767 return ret;
1768
1769 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_FALSE);
1770}
1771
1772
1773static HPDF_STATUS
1774MS_PMincho_Italic_Init (HPDF_FontDef fontdef)
1775{
1776 HPDF_STATUS ret = MS_PMincho_Init (fontdef);
1777
1778 if (ret != HPDF_OK)
1779 return ret;
1780
1781 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_FALSE, HPDF_TRUE);
1782}
1783
1784static HPDF_STATUS
1785MS_PMincho_BoldItalic_Init (HPDF_FontDef fontdef)
1786{
1787 HPDF_STATUS ret = MS_PMincho_Init (fontdef);
1788
1789 if (ret != HPDF_OK)
1790 return ret;
1791
1792 return HPDF_CIDFontDef_ChangeStyle (fontdef, HPDF_TRUE, HPDF_TRUE);
1793}
1794
1795
1796HPDF_EXPORT(HPDF_STATUS)
1797HPDF_UseJPFonts (HPDF_Doc pdf)
1798{
1799 HPDF_FontDef fontdef;
1800 HPDF_STATUS ret;
1801
1802 if (!HPDF_Doc_Validate (pdf))
1803 return HPDF_INVALID_DOCUMENT;
1804
1805 /* MS-Gothic */
1806 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-Gothic",
1807 MS_Gothic_Init);
1808
1809 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1810 return ret;
1811
1812 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-Gothic,Bold",
1813 MS_Gothic_Bold_Init);
1814
1815 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1816 return ret;
1817
1818 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-Gothic,Italic",
1819 MS_Gothic_Italic_Init);
1820
1821 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1822 return ret;
1823
1824 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-Gothic,BoldItalic",
1825 MS_Gothic_BoldItalic_Init);
1826
1827 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1828 return ret;
1829
1830 /* MS-PGothic */
1831 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-PGothic",
1832 MS_PGothic_Init);
1833
1834 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1835 return ret;
1836
1837 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-PGothic,Bold",
1838 MS_PGothic_Bold_Init);
1839
1840 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1841 return ret;
1842
1843 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-PGothic,Italic",
1844 MS_PGothic_Italic_Init);
1845
1846 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1847 return ret;
1848
1849 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-PGothic,BoldItalic",
1850 MS_PGothic_BoldItalic_Init);
1851
1852 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1853 return ret;
1854
1855 /* MS-Mincho */
1856 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-Mincho",
1857 MS_Mincho_Init);
1858
1859 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1860 return ret;
1861
1862 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-Mincho,Bold",
1863 MS_Mincho_Bold_Init);
1864
1865 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1866 return ret;
1867
1868 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-Mincho,Italic",
1869 MS_Mincho_Italic_Init);
1870
1871 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1872 return ret;
1873
1874 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-Mincho,BoldItalic",
1875 MS_Mincho_BoldItalic_Init);
1876
1877 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1878 return ret;
1879
1880 /* MS-PMincho */
1881 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-PMincho",
1882 MS_PMincho_Init);
1883
1884 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1885 return ret;
1886
1887 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-PMincho,Bold",
1888 MS_PMincho_Bold_Init);
1889
1890 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1891 return ret;
1892
1893 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-PMincho,Italic",
1894 MS_PMincho_Italic_Init);
1895
1896 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1897 return ret;
1898
1899 fontdef = HPDF_CIDFontDef_New (pdf->mmgr, "MS-PMincho,BoldItalic",
1900 MS_PMincho_BoldItalic_Init);
1901
1902 if ((ret = HPDF_Doc_RegisterFontDef (pdf, fontdef)) != HPDF_OK)
1903 return ret;
1904
1905 return HPDF_OK;
1906}
1907
1908