hpdf 2.0.8

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