Commit 3e19d85dd46eed324791e4aa6fb4c97d76385c0e

David Turner 2002-07-17T21:52:20

* include/freetype/config/ftoption.h, include/freetype/internal/tttypes.h, src/base/ftobjs.c, src/bdf/bdfdrivr.c, src/cff/cffobjs.c, src/pcf/pcfdrivr.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c, src/sfnt/ttcmap0.h, src/sfnt/ttload.c, src/type1/t1objs.c, src/type42/t42objs.c, src/winfonts/winfnt.c: code cleanup, FT_CONFIG_OPTION_USE_CMAPS is now the default

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
diff --git a/ChangeLog b/ChangeLog
index aa61bd4..964002b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,13 @@
     src/cache/ftccache.c: cleaning up the cache sub-system code, linear
     hashing is now the default
 
+    * include/freetype/config/ftoption.h, include/freetype/internal/tttypes.h,
+    src/base/ftobjs.c, src/bdf/bdfdrivr.c, src/cff/cffobjs.c,
+    src/pcf/pcfdrivr.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
+    src/sfnt/ttcmap0.h, src/sfnt/ttload.c, src/type1/t1objs.c,
+    src/type42/t42objs.c, src/winfonts/winfnt.c: code cleanup,
+    FT_CONFIG_OPTION_USE_CMAPS is now the default
+
 2002-07-11  David Turner  <david@freetype.org>
 
     * src/sfnt/ttload.c, src/sfnt/ttload.h, src/sfnt/ttdriver.c: changing
diff --git a/include/freetype/internal/ftdriver.h b/include/freetype/internal/ftdriver.h
index 875d090..1ad9607 100644
--- a/include/freetype/internal/ftdriver.h
+++ b/include/freetype/internal/ftdriver.h
@@ -186,12 +186,10 @@ FT_BEGIN_HEADER
     FT_Size_ResetPixelsFunc   set_pixel_sizes;
 
     FT_Slot_LoadFunc          load_glyph;
-    FT_CharMap_CharIndexFunc  get_char_index;
 
     FT_Face_GetKerningFunc    get_kerning;
     FT_Face_AttachFunc        attach_file;
     FT_Face_GetAdvancesFunc   get_advances;
-    FT_CharMap_CharNextFunc   get_next_char;
 
   } FT_Driver_ClassRec, *FT_Driver_Class;
 
diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h
index ec3df9d..94a8905 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -1483,18 +1483,9 @@ FT_BEGIN_HEADER
     TT_OS2                os2;          /* TrueType OS/2 table            */
     TT_Postscript         postscript;   /* TrueType Postscript table      */
 
-#ifdef FT_CONFIG_OPTION_USE_CMAPS
-
     FT_Byte*              cmap_table;   /* extracted 'cmap' table */
     FT_ULong              cmap_size;
 
-#else /* !FT_CONFIG_OPTION_USE_CMAPS */
-
-    FT_Int                num_charmaps;
-    TT_CharMap            charmaps;     /* array of TT_CharMapRec */
-
-#endif /* !FT_CONFIG_OPTION_USE_CMAPS */
-
     TT_Loader_GotoTableFunc   goto_table;
 
     TT_Loader_StartGlyphFunc  access_glyph_frame;
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index c37072d..d5fb518 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -631,8 +631,6 @@
     if ( face->generic.finalizer )
       face->generic.finalizer( face );
 
-#ifdef FT_CONFIG_OPTION_USE_CMAPS
-
     /* discard charmaps */
     {
       FT_Int  n;
@@ -652,8 +650,6 @@
       face->num_charmaps = 0;
     }
 
-#endif /* FT_CONFIG_OPTION_USE_CMAPS */
-
 
     /* finalize format-specific stuff */
     if ( clazz->done_face )
@@ -1520,8 +1516,6 @@
 
   /* documentation is in freetype.h */
 
-#ifdef FT_CONFIG_OPTION_USE_CMAPS
-
   FT_EXPORT_DEF( FT_UInt )
   FT_Get_Char_Index( FT_Face   face,
                      FT_ULong  charcode )
@@ -1539,25 +1533,6 @@
     return  result;
   }
 
-#else /* !FT_CONFIG_OPTION_USE_CMAPS */
-
-  FT_EXPORT_DEF( FT_UInt )
-  FT_Get_Char_Index( FT_Face   face,
-                     FT_ULong  charcode )
-  {
-    FT_UInt    result = 0;
-    FT_Driver  driver;
-
-
-    if ( face && face->charmap )
-    {
-      driver = face->driver;
-      result = driver->clazz->get_char_index( face->charmap, charcode );
-    }
-    return result;
-  }
-
-#endif /* !FT_CONFIG_OPTION_USE_CMAPS */
 
 
   /* documentation is in freetype.h */
@@ -1586,8 +1561,6 @@
   /* documentation is in freetype.h */
 
 
-#ifdef FT_CONFIG_OPTION_USE_CMAPS
-
   FT_EXPORT_DEF( FT_ULong )
   FT_Get_Next_Char( FT_Face   face,
                     FT_ULong  charcode,
@@ -1613,37 +1586,6 @@
     return result;
   }
 
-#else /* !FT_CONFIG_OPTION_USE_CMAPS */
-
-  FT_EXPORT_DEF( FT_ULong )
-  FT_Get_Next_Char( FT_Face   face,
-                    FT_ULong  charcode,
-                    FT_UInt  *agindex )
-  {
-    FT_ULong   result = 0;
-    FT_UInt    gindex = 0;
-    FT_Driver  driver;
-
-
-    if ( face && face->charmap )
-    {
-      driver = face->driver;
-      result = driver->clazz->get_next_char( face->charmap, charcode );
-      if ( result != 0 )
-      {
-        gindex = driver->clazz->get_char_index( face->charmap, result );
-        if ( gindex == 0 )
-          result = 0;
-      }
-    }
-
-    if ( agindex )
-      *agindex = gindex;
-
-    return result;
-  }
-
-#endif /* !FT_CONFIG_OPTION_USE_CMAPS */
 
 
   /* documentation is in freetype.h */
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index 2ca69b5..5af8e3a 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -662,13 +662,9 @@ THE SOFTWARE.
 
     (FT_Slot_LoadFunc)        BDF_Glyph_Load,
 
-    (FT_CharMap_CharIndexFunc)0,
-
     (FT_Face_GetKerningFunc)  0,
     (FT_Face_AttachFunc)      0,
-    (FT_Face_GetAdvancesFunc) 0,
-
-    (FT_CharMap_CharNextFunc) 0
+    (FT_Face_GetAdvancesFunc) 0
   };
 
 
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index 07c467c..91ce882 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -275,94 +275,6 @@
   }
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    cff_get_char_index                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Uses a charmap to return a given character code's glyph index.     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    charmap  :: A handle to the source charmap object.                 */
-  /*    charcode :: The character code.                                    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Glyph index.  0 means `undefined character code'.                  */
-  /*                                                                       */
-  static FT_UInt
-  cff_get_char_index( TT_CharMap  charmap,
-                      FT_Long     charcode )
-  {
-    FT_Error      error;
-    CFF_Face      face;
-    TT_CMapTable  cmap;
-
-
-    cmap = &charmap->cmap;
-    face = (CFF_Face)charmap->root.face;
-
-    /* Load table if needed */
-    if ( !cmap->loaded )
-    {
-      SFNT_Service  sfnt = (SFNT_Service)face->sfnt;
-
-
-      error = sfnt->load_charmap( face, cmap, face->root.stream );
-      if ( error )
-        return 0;
-
-      cmap->loaded = TRUE;
-    }
-
-    return ( cmap->get_index ? cmap->get_index( cmap, charcode ) : 0 );
-  }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    cff_get_next_char                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Uses a charmap to return the next encoded charcode.                */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    charmap  :: A handle to the source charmap object.                 */
-  /*    charcode :: The character code.                                    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Char code.  0 means `no encoded chars above the given one'.        */
-  /*                                                                       */
-  static FT_Long
-  cff_get_next_char( TT_CharMap  charmap,
-                     FT_Long     charcode )
-  {
-    FT_Error      error;
-    CFF_Face      face;
-    TT_CMapTable  cmap;
-
-
-    cmap = &charmap->cmap;
-    face = (CFF_Face)charmap->root.face;
-
-    /* Load table if needed */
-    if ( !cmap->loaded )
-    {
-      SFNT_Service  sfnt = (SFNT_Service)face->sfnt;
-
-
-      error = sfnt->load_charmap( face, cmap, face->root.stream );
-      if ( error )
-        return 0;
-
-      cmap->loaded = TRUE;
-    }
-
-    return ( cmap->get_next_char ? cmap->get_next_char( cmap, charcode )
-                                 : 0 );
-  }
-
 
   /*************************************************************************/
   /*                                                                       */
@@ -469,7 +381,7 @@
       ft_module_font_driver       |
       ft_module_driver_scalable   |
       ft_module_driver_has_hinter,
-      
+
       sizeof( CFF_DriverRec ),
       "cff",
       0x10000L,
@@ -498,13 +410,10 @@
     (FT_Size_ResetPixelsFunc) cff_size_reset,
 
     (FT_Slot_LoadFunc)        Load_Glyph,
-    (FT_CharMap_CharIndexFunc)cff_get_char_index,
 
     (FT_Face_GetKerningFunc)  Get_Kerning,
     (FT_Face_AttachFunc)      0,
     (FT_Face_GetAdvancesFunc) 0,
-    
-    (FT_CharMap_CharNextFunc) cff_get_next_char
   };
 
 
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 32515a8..bb04664 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -447,12 +447,12 @@
 
         root->style_flags = flags;
       }
-        
+
       /*******************************************************************/
       /*                                                                 */
       /* Compute char maps.                                              */
       /*                                                                 */
-      
+
       /* try to synthetize a Unicode charmap if there is none available */
       /* already. If an OpenType font contains a Unicode "cmap", we     */
       /* will use it, wathever be in the CFF part of the file..         */
@@ -461,30 +461,28 @@
         FT_CharMap     cmap;
         FT_UInt        nn;
         CFF_Encoding   encoding = &cff->encoding;
-        
+
         for ( nn = 0; nn < (FT_UInt) root->num_charmaps; nn++ )
         {
           cmap = root->charmaps[nn];
-          
+
           /* Windows Unicode (3,1) ? */
           if ( cmap->platform_id == 3 && cmap->encoding_id == 1 )
             goto Skip_Unicode;
-            
+
           /* Deprecated Unicode platform id  ?? */
           if ( cmap->platform_id == 0 )
             goto Skip_Unicode; /* Standard Unicode (deprecated) */
         }
-        
-        /* we didn't find a Unicode charmap, synthetize one */
-#ifdef FT_CONFIG_OPTION_USE_CMAPS
 
+        /* we didn't find a Unicode charmap, synthetize one */
         cmaprec.face        = root;
         cmaprec.platform_id = 3;
         cmaprec.encoding_id = 1;
         cmaprec.encoding    = ft_encoding_unicode;
 
         nn = (FT_UInt) root->num_charmaps;
-        
+
         FT_CMap_New( &cff_cmap_unicode_class_rec, NULL, &cmaprec, NULL );
 
         /* if no Unicode charmap was previously selected, select this one */
@@ -495,7 +493,7 @@
         if ( encoding->count > 0 )
         {
           FT_CMap_Class  clazz;
-          
+
           cmaprec.face        = root;
           cmaprec.platform_id = 7;  /* Adobe platform id */
 
@@ -506,28 +504,22 @@
               cmaprec.encoding    = ft_encoding_adobe_standard;
               clazz               = &cff_cmap_encoding_class_rec;
               break;
-            
+
             case 1:
               cmaprec.encoding_id = 1;
               cmaprec.encoding    = ft_encoding_adobe_expert;
               clazz               = &cff_cmap_encoding_class_rec;
               break;
-            
+
             default:
               cmaprec.encoding_id = 3;
               cmaprec.encoding    = ft_encoding_adobe_custom;
               clazz               = &cff_cmap_encoding_class_rec;
           }
-          
-          FT_CMap_New( clazz, NULL, &cmaprec, NULL );
 
-#else  /* !FT_CONFIG_OPTION_USE_CMAPS */
-
-          /* unimplemented !! */
-          
-#endif /* !FT_CONFIG_OPTION_USE_CMAPS */
+          FT_CMap_New( clazz, NULL, &cmaprec, NULL );
         }
-        
+
       }
     }
 
diff --git a/src/cid/cidriver.c b/src/cid/cidriver.c
index 0d0a5fb..3a175b8 100644
--- a/src/cid/cidriver.c
+++ b/src/cid/cidriver.c
@@ -40,11 +40,11 @@
   cid_get_postscript_name( CID_Face  face )
   {
     const char*  result = face->cid.cid_font_name;
-    
+
 
     if ( result && result[0] == '/' )
       result++;
-      
+
     return result;
   }
 
@@ -63,227 +63,6 @@
   }
 
 
-#if 0 /* unimplemented yet */
-
-  static FT_Error
-  cid_Get_Kerning( T1_Face     face,
-                   FT_UInt     left_glyph,
-                   FT_UInt     right_glyph,
-                   FT_Vector*  kerning )
-  {
-    CID_AFM*  afm;
-
-
-    kerning->x = 0;
-    kerning->y = 0;
-
-    afm = (CID_AFM*)face->afm_data;
-    if ( afm )
-      CID_Get_Kerning( afm, left_glyph, right_glyph, kerning );
-
-    return CID_Err_Ok;
-  }
-
-#endif /* 0 */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    Cid_Get_Char_Index                                                 */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Uses a charmap to return a given character code's glyph index.     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    charmap  :: A handle to the source charmap object.                 */
-  /*                                                                       */
-  /*    charcode :: The character code.                                    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Glyph index.  0 means `undefined character code'.                  */
-  /*                                                                       */
-  static FT_UInt
-  CID_Get_Char_Index( FT_CharMap  charmap,
-                      FT_Long     charcode )
-  {
-    T1_Face          face;
-    FT_UInt          result = 0;
-    PSNames_Service  psnames;
-
-
-    face = (T1_Face)charmap->face;
-    psnames = (PSNames_Service)face->psnames;
-    if ( psnames )
-      switch ( charmap->encoding )
-      {
-        /*******************************************************************/
-        /*                                                                 */
-        /* Unicode encoding support                                        */
-        /*                                                                 */
-      case ft_encoding_unicode:
-        /* use the `PSNames' module to synthetize the Unicode charmap */
-        result = psnames->lookup_unicode( &face->unicode_map,
-                                          (FT_ULong)charcode );
-
-        /* the function returns 0xFFFF if the Unicode charcode has */
-        /* no corresponding glyph.                                 */
-        if ( result == 0xFFFF )
-          result = 0;
-        goto Exit;
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* Custom Type 1 encoding                                          */
-        /*                                                                 */
-      case ft_encoding_adobe_custom:
-        {
-          T1_Encoding  encoding = &face->type1.encoding;
-
-
-          if ( charcode >= encoding->code_first &&
-               charcode <= encoding->code_last  )
-            result = encoding->char_index[charcode];
-          goto Exit;
-        }
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* Adobe Standard & Expert encoding support                        */
-        /*                                                                 */
-      default:
-        if ( charcode < 256 )
-        {
-          FT_UInt      code;
-          FT_Int       n;
-          const char*  glyph_name;
-
-
-          code = psnames->adobe_std_encoding[charcode];
-          if ( charmap->encoding == ft_encoding_adobe_expert )
-            code = psnames->adobe_expert_encoding[charcode];
-
-          glyph_name = psnames->adobe_std_strings( code );
-          if ( !glyph_name )
-            break;
-
-          for ( n = 0; n < face->type1.num_glyphs; n++ )
-          {
-            const char*  gname = face->type1.glyph_names[n];
-
-
-            if ( gname && gname[0] == glyph_name[0] &&
-                 ft_strcmp( gname, glyph_name ) == 0   )
-            {
-              result = n;
-              break;
-            }
-          }
-        }
-      }
-
-  Exit:
-    return result;
-  }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    Cid_Get_Next_Char                                                  */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Uses a charmap to return the next encoded char after.              */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    charmap  :: A handle to the source charmap object.                 */
-  /*                                                                       */
-  /*    charcode :: The character code.                                    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Next char code.  0 means `no more char codes'.                     */
-  /*                                                                       */
-  static FT_Long
-  CID_Get_Next_Char( FT_CharMap  charmap,
-                     FT_Long     charcode )
-  {
-    T1_Face          face;
-    PSNames_Service  psnames;
-
-
-    face    = (T1_Face)charmap->face;
-    psnames = (PSNames_Service)face->psnames;
-
-    if ( psnames )
-      switch ( charmap->encoding )
-      {
-        /*******************************************************************/
-        /*                                                                 */
-        /* Unicode encoding support                                        */
-        /*                                                                 */
-      case ft_encoding_unicode:
-        /* use the `PSNames' module to synthetize the Unicode charmap */
-        return psnames->next_unicode (&face->unicode_map,
-                                      (FT_ULong)charcode );
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* Custom Type 1 encoding                                          */
-        /*                                                                 */
-      case ft_encoding_adobe_custom:
-        {
-          T1_Encoding  encoding = &face->type1.encoding;
-
-
-          charcode++;
-          if ( charcode < encoding->code_first )
-            charcode = encoding->code_first;
-          while ( charcode <= encoding->code_last )
-          {
-            if ( encoding->char_index[charcode] )
-              return charcode;
-            charcode++;
-          }
-        }
-        break;
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* Adobe Standard & Expert encoding support                        */
-        /*                                                                 */
-      default:
-        while ( ++charcode < 256 )
-        {
-          FT_UInt      code;
-          FT_Int       n;
-          const char*  glyph_name;
-
-
-          code = psnames->adobe_std_encoding[charcode];
-          if ( charmap->encoding == ft_encoding_adobe_expert )
-            code = psnames->adobe_expert_encoding[charcode];
-
-          glyph_name = psnames->adobe_std_strings( code );
-          if ( !glyph_name )
-            continue;
-
-          for ( n = 0; n < face->type1.num_glyphs; n++ )
-          {
-            const char*  gname = face->type1.glyph_names[n];
-
-
-            if ( gname && gname[0] == glyph_name[0] &&
-                 ft_strcmp( gname, glyph_name ) == 0   )
-            {
-              return charcode;
-            }
-          }
-        }
-      }
-
-    return 0;
-  }
-
 
   FT_CALLBACK_TABLE_DEF
   const FT_Driver_ClassRec  t1cid_driver_class =
@@ -293,7 +72,7 @@
       ft_module_font_driver       |
       ft_module_driver_scalable   |
       ft_module_driver_has_hinter ,
-      
+
       sizeof( FT_DriverRec ),
       "t1cid",   /* module name           */
       0x10000L,  /* version 1.0 of driver */
@@ -323,14 +102,11 @@
     (FT_Size_ResetPixelsFunc) CID_Size_Reset,
 
     (FT_Slot_LoadFunc)        CID_Load_Glyph,
-    (FT_CharMap_CharIndexFunc)CID_Get_Char_Index,
 
     (FT_Face_GetKerningFunc)  0,
     (FT_Face_AttachFunc)      0,
 
     (FT_Face_GetAdvancesFunc) 0,
-    
-    (FT_CharMap_CharNextFunc) CID_Get_Next_Char
   };
 
 
diff --git a/src/pcf/pcfdriver.c b/src/pcf/pcfdriver.c
index 455ad0a..cc6cb91 100644
--- a/src/pcf/pcfdriver.c
+++ b/src/pcf/pcfdriver.c
@@ -460,13 +460,9 @@ THE SOFTWARE.
 
     (FT_Slot_LoadFunc)        PCF_Glyph_Load,
 
-    (FT_CharMap_CharIndexFunc)0,
-
     (FT_Face_GetKerningFunc)  0,
     (FT_Face_AttachFunc)      0,
-    (FT_Face_GetAdvancesFunc) 0,
-
-    (FT_CharMap_CharNextFunc) 0
+    (FT_Face_GetAdvancesFunc) 0
   };
 
 
diff --git a/src/pfr/pfrdrivr.c b/src/pfr/pfrdrivr.c
index 64041f3..a4fcc42 100644
--- a/src/pfr/pfrdrivr.c
+++ b/src/pfr/pfrdrivr.c
@@ -57,13 +57,10 @@
     (FT_Size_ResetPointsFunc) NULL,
     (FT_Size_ResetPixelsFunc) NULL,
     (FT_Slot_LoadFunc)        pfr_slot_load,
-    (FT_CharMap_CharIndexFunc)NULL,
 
     (FT_Face_GetKerningFunc)  pfr_face_get_kerning,
     (FT_Face_AttachFunc)      0,
-    (FT_Face_GetAdvancesFunc) 0,
-
-    (FT_CharMap_CharNextFunc) NULL
+    (FT_Face_GetAdvancesFunc) 0
   };
 
 
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index fb67235..3b55d63 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -578,7 +578,6 @@
       /*   Try to set the charmap encoding according to the platform &     */
       /*   encoding ID of each charmap.                                    */
       /*                                                                   */
-#ifdef FT_CONFIG_OPTION_USE_CMAPS
 
       TT_Build_CMaps( face );  /* ignore errors */
 
@@ -605,41 +604,6 @@
         }
       }
 
-#else /* !FT_CONFIG_OPTION_USE_CMAPS */
-
-      {
-        TT_CharMap  charmap = face->charmaps;
-
-
-        charmap            = face->charmaps;
-        root->num_charmaps = face->num_charmaps;
-
-        /* allocate table of pointers */
-        if ( FT_NEW_ARRAY( root->charmaps, root->num_charmaps ) )
-          goto Exit;
-
-        for ( n = 0; n < root->num_charmaps; n++, charmap++ )
-        {
-          FT_Int  platform = charmap->cmap.platformID;
-          FT_Int  encoding = charmap->cmap.platformEncodingID;
-
-
-          charmap->root.face        = (FT_Face)face;
-          charmap->root.platform_id = (FT_UShort)platform;
-          charmap->root.encoding_id = (FT_UShort)encoding;
-          charmap->root.encoding    = sfnt_find_encoding( platform, encoding );
-
-          /* now, set root->charmap with a unicode charmap */
-          /* wherever available                            */
-          if ( !root->charmap                                &&
-               charmap->root.encoding == ft_encoding_unicode )
-            root->charmap = (FT_CharMap)charmap;
-
-          root->charmaps[n] = (FT_CharMap)charmap;
-        }
-      }
-
-#endif /* !FT_CONFIG_OPTION_USE_CMAPS */
 
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
@@ -808,8 +772,6 @@
     FT_FREE( face->dir_tables );
     face->num_tables = 0;
 
-#ifdef FT_CONFIG_OPTION_USE_CMAPS
-
     {
       FT_Stream  stream = FT_FACE_STREAM( face );
 
@@ -819,27 +781,6 @@
       face->cmap_size = 0;
     }
 
-#else /* !FT_CONFIG_OPTION_USE_CMAPS */
-
-    /* freeing the character mapping tables */
-    if ( sfnt && sfnt->load_charmaps )
-    {
-      FT_UShort  n;
-
-
-      for ( n = 0; n < face->num_charmaps; n++ )
-        sfnt->free_charmap( face, &face->charmaps[n].cmap );
-    }
-
-    FT_FREE( face->charmaps );
-    face->num_charmaps = 0;
-
-    FT_FREE( face->root.charmaps );
-    face->root.num_charmaps = 0;
-    face->root.charmap      = 0;
-
-#endif /* !FT_CONFIG_OPTION_USE_CMAPS */
-
     /* freeing the horizontal metrics */
     FT_FREE( face->horizontal.long_metrics );
     FT_FREE( face->horizontal.short_metrics );
diff --git a/src/sfnt/ttcmap0.c b/src/sfnt/ttcmap0.c
index 0cd5d73..2940ac3 100644
--- a/src/sfnt/ttcmap0.c
+++ b/src/sfnt/ttcmap0.c
@@ -1628,8 +1628,6 @@
 #endif /* TT_CONFIG_CMAP_FORMAT_12 */
 
 
-#ifdef FT_CONFIG_OPTION_USE_CMAPS
-
   static const TT_CMap_Class  tt_cmap_classes[] =
   {
 #ifdef TT_CONFIG_CMAP_FORMAT_0
@@ -1744,7 +1742,5 @@
     return 0;
   }
 
-#endif /* FT_CONFIG_OPTION_USE_CMAPS */
-
 
 /* END */
diff --git a/src/sfnt/ttcmap0.h b/src/sfnt/ttcmap0.h
index a37e909..efead24 100644
--- a/src/sfnt/ttcmap0.h
+++ b/src/sfnt/ttcmap0.h
@@ -54,7 +54,7 @@ FT_BEGIN_HEADER
   {
     FT_ValidatorRec  validator;
     FT_UInt          num_glyphs;
-    
+
   } TT_ValidatorRec, *TT_Validator;
 
 
@@ -62,13 +62,9 @@ FT_BEGIN_HEADER
 #define TT_VALID_GLYPH_COUNT( x )  TT_VALIDATOR( x )->num_glyphs
 
 
-#ifdef FT_CONFIG_OPTION_USE_CMAPS
-
   FT_LOCAL( FT_Error )
   TT_Build_CMaps( TT_Face  face );
 
-#endif
-
 
 FT_END_HEADER
 
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 4b27f58..6fe6b3c 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -1200,8 +1200,6 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
 
-#ifdef FT_CONFIG_OPTION_USE_CMAPS
-
   FT_LOCAL_DEF( FT_Error )
   TT_Load_CMap( TT_Face    face,
                 FT_Stream  stream )
@@ -1229,105 +1227,6 @@
     return error;
   }
 
-#else /* !FT_CONFIG_OPTION_USE_CMAPS */
-
-  FT_LOCAL_DEF( FT_Error )
-  TT_Load_CMap( TT_Face    face,
-                FT_Stream  stream )
-  {
-    FT_Error       error;
-    FT_Memory      memory = stream->memory;
-    FT_Long        table_start;
-    TT_CMapDirRec  cmap_dir;
-
-    const FT_Frame_Field  cmap_fields[] =
-    {
-#undef  FT_STRUCTURE
-#define FT_STRUCTURE  TT_CMapDirRec
-
-      FT_FRAME_START( 4 ),
-        FT_FRAME_USHORT( tableVersionNumber ),
-        FT_FRAME_USHORT( numCMaps ),
-      FT_FRAME_END
-    };
-
-    const FT_Frame_Field  cmap_rec_fields[] =
-    {
-#undef  FT_STRUCTURE
-#define FT_STRUCTURE  TT_CMapTableRec
-
-      FT_FRAME_START( 4 ),
-        FT_FRAME_USHORT( format ),
-        FT_FRAME_USHORT( length ),
-      FT_FRAME_END
-    };
-
-
-    FT_TRACE2(( "CMaps " ));
-
-    error = face->goto_table( face, TTAG_cmap, stream, 0 );
-    if ( error )
-    {
-      error = SFNT_Err_CMap_Table_Missing;
-      goto Exit;
-    }
-
-    table_start = FT_STREAM_POS();
-
-    if ( FT_STREAM_READ_FIELDS( cmap_fields, &cmap_dir ) )
-      goto Exit;
-
-    /* reserve space in face table for cmap tables */
-    if ( FT_NEW_ARRAY( face->charmaps, cmap_dir.numCMaps ) )
-      goto Exit;
-
-    face->num_charmaps = cmap_dir.numCMaps;
-    {
-      TT_CharMap  charmap = face->charmaps;
-      TT_CharMap  limit   = charmap + face->num_charmaps;
-
-
-      /* read the header of each charmap first */
-      if ( FT_FRAME_ENTER( face->num_charmaps * 8L ) )
-        goto Exit;
-
-      for ( ; charmap < limit; charmap++ )
-      {
-        TT_CMapTable  cmap;
-
-
-        charmap->root.face = (FT_Face)face;
-        cmap               = &charmap->cmap;
-
-        cmap->loaded             = FALSE;
-        cmap->platformID         = FT_GET_USHORT();
-        cmap->platformEncodingID = FT_GET_USHORT();
-        cmap->offset             = (FT_ULong)FT_GET_LONG();
-      }
-
-      FT_FRAME_EXIT();
-
-      /* now read the rest of each table */
-      for ( charmap = face->charmaps; charmap < limit; charmap++ )
-      {
-        TT_CMapTable  cmap = &charmap->cmap;
-
-
-        if ( FT_STREAM_SEEK( table_start + (FT_Long)cmap->offset ) ||
-             FT_STREAM_READ_FIELDS( cmap_rec_fields, cmap )        )
-          goto Exit;
-
-        cmap->offset = FT_STREAM_POS();
-      }
-    }
-
-    FT_TRACE2(( "loaded\n" ));
-
-  Exit:
-    return error;
-  }
-
-#endif /* !FT_CONFIG_OPTION_USE_CMAPS */
 
 
   /*************************************************************************/
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index d0678a3..62ba577 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -516,13 +516,10 @@
     (FT_Size_ResetPointsFunc) Set_Char_Sizes,
     (FT_Size_ResetPixelsFunc) Set_Pixel_Sizes,
     (FT_Slot_LoadFunc)        Load_Glyph,
-    (FT_CharMap_CharIndexFunc)Get_Char_Index,
 
     (FT_Face_GetKerningFunc)  Get_Kerning,
     (FT_Face_AttachFunc)      0,
-    (FT_Face_GetAdvancesFunc) 0,
-    
-    (FT_CharMap_CharNextFunc) Get_Next_Char
+    (FT_Face_GetAdvancesFunc) 0
   };
 
 
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index 968f767..b255f9d 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -227,233 +227,6 @@
 #endif /* T1_CONFIG_OPTION_NO_AFM */
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    Get_Char_Index                                                     */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Uses a charmap to return a given character code's glyph index.     */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    charmap  :: A handle to the source charmap object.                 */
-  /*                                                                       */
-  /*    charcode :: The character code.                                    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Glyph index.  0 means `undefined character code'.                  */
-  /*                                                                       */
-  static FT_UInt
-  Get_Char_Index( FT_CharMap  charmap,
-                  FT_Long     charcode )
-  {
-    T1_Face          face;
-    FT_UInt          result = 0;
-    PSNames_Service  psnames;
-
-
-    face    = (T1_Face)charmap->face;
-    psnames = (PSNames_Service)face->psnames;
-    if ( psnames )
-      switch ( charmap->encoding )
-      {
-        /*******************************************************************/
-        /*                                                                 */
-        /* Unicode encoding support                                        */
-        /*                                                                 */
-      case ft_encoding_unicode:
-        /* use the `PSNames' module to synthetize the Unicode charmap */
-        result = psnames->lookup_unicode( &face->unicode_map,
-                                          (FT_ULong)charcode );
-
-        /* the function returns 0xFFFF if the Unicode charcode has */
-        /* no corresponding glyph                                  */
-        if ( result == 0xFFFFU )
-          result = 0;
-        goto Exit;
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* ISOLatin1 encoding support                                      */
-        /*                                                                 */
-      case ft_encoding_latin_1:
-        /* ISOLatin1 is the first page of Unicode */
-        if ( charcode < 256 && psnames->unicode_value )
-        {
-          result = psnames->lookup_unicode( &face->unicode_map,
-                                            (FT_ULong)charcode );
-
-          /* the function returns 0xFFFF if the Unicode charcode has */
-          /* no corresponding glyph                                  */
-          if ( result == 0xFFFFU )
-            result = 0;
-        }
-        goto Exit;
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* Custom Type 1 encoding                                          */
-        /*                                                                 */
-      case ft_encoding_adobe_custom:
-        {
-          T1_Encoding  encoding = &face->type1.encoding;
-
-
-          if ( charcode >= encoding->code_first &&
-               charcode <= encoding->code_last  )
-            result = encoding->char_index[charcode];
-          goto Exit;
-        }
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* Adobe Standard & Expert encoding support                        */
-        /*                                                                 */
-      default:
-        if ( charcode < 256 )
-        {
-          FT_UInt      code;
-          FT_Int       n;
-          const char*  glyph_name;
-
-
-          code = psnames->adobe_std_encoding[charcode];
-          if ( charmap->encoding == ft_encoding_adobe_expert )
-            code = psnames->adobe_expert_encoding[charcode];
-
-          glyph_name = psnames->adobe_std_strings( code );
-          if ( !glyph_name )
-            break;
-
-          for ( n = 0; n < face->type1.num_glyphs; n++ )
-          {
-            const char*  gname = face->type1.glyph_names[n];
-
-
-            if ( gname && gname[0] == glyph_name[0] &&
-                 ft_strcmp( gname, glyph_name ) == 0   )
-            {
-              result = n;
-              break;
-            }
-          }
-        }
-      }
-  Exit:
-    return result;
-  }
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Function>                                                            */
-  /*    Get_Next_Char                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Uses a charmap to return the next encoded char.                    */
-  /*                                                                       */
-  /* <Input>                                                               */
-  /*    charmap  :: A handle to the source charmap object.                 */
-  /*                                                                       */
-  /*    charcode :: The character code.                                    */
-  /*                                                                       */
-  /* <Return>                                                              */
-  /*    Next char code.  0 means `no more char codes'.                     */
-  /*                                                                       */
-  static FT_Long
-  Get_Next_Char( FT_CharMap  charmap,
-                 FT_Long     charcode )
-  {
-    T1_Face          face;
-    PSNames_Service  psnames;
-
-
-    face    = (T1_Face)charmap->face;
-    psnames = (PSNames_Service)face->psnames;
-
-    if ( psnames )
-      switch ( charmap->encoding )
-      {
-        /*******************************************************************/
-        /*                                                                 */
-        /* Unicode encoding support                                        */
-        /*                                                                 */
-      case ft_encoding_unicode:
-        /* use the `PSNames' module to synthetize the Unicode charmap */
-        return psnames->next_unicode( &face->unicode_map,
-                                      (FT_ULong)charcode );
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* ISOLatin1 encoding support                                      */
-        /*                                                                 */
-      case ft_encoding_latin_1:
-        {
-          FT_Long  code;
-
-
-          /* use the `PSNames' module to synthetize the Unicode charmap */
-          code = psnames->next_unicode( &face->unicode_map,
-                                        (FT_ULong)charcode );
-          if ( code < 256 )
-            return code;
-          break;
-        }
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* Custom Type 1 encoding                                          */
-        /*                                                                 */
-      case ft_encoding_adobe_custom:
-        {
-          T1_Encoding  encoding = &face->type1.encoding;
-
-
-          charcode++;
-          if ( charcode < encoding->code_first )
-            charcode = encoding->code_first;
-          while ( charcode <= encoding->code_last  )
-          {
-            if ( encoding->char_index[charcode] )
-              return charcode;
-            charcode++;
-          }
-        }
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* Adobe Standard & Expert encoding support                        */
-        /*                                                                 */
-      default:
-        while ( ++charcode < 256 )
-        {
-          FT_UInt      code;
-          FT_Int       n;
-          const char*  glyph_name;
-
-
-          code = psnames->adobe_std_encoding[charcode];
-          if ( charmap->encoding == ft_encoding_adobe_expert )
-            code = psnames->adobe_expert_encoding[charcode];
-
-          glyph_name = psnames->adobe_std_strings( code );
-          if ( !glyph_name )
-            continue;
-
-          for ( n = 0; n < face->type1.num_glyphs; n++ )
-          {
-            const char*  gname = face->type1.glyph_names[n];
-
-
-            if ( gname && gname[0] == glyph_name[0]  &&
-                 ft_strcmp( gname, glyph_name ) == 0 )
-              return charcode;
-          }
-        }
-      }
-
-    return 0;
-  }
 
 
   FT_CALLBACK_TABLE_DEF
@@ -491,7 +264,6 @@
     (FT_Size_ResetPointsFunc) T1_Size_Reset,
     (FT_Size_ResetPixelsFunc) T1_Size_Reset,
     (FT_Slot_LoadFunc)        T1_Load_Glyph,
-    (FT_CharMap_CharIndexFunc)Get_Char_Index,
 
 #ifdef T1_CONFIG_OPTION_NO_AFM
     (FT_Face_GetKerningFunc)  0,
@@ -500,9 +272,7 @@
     (FT_Face_GetKerningFunc)  Get_Kerning,
     (FT_Face_AttachFunc)      T1_Read_AFM,
 #endif
-    (FT_Face_GetAdvancesFunc) 0,
-
-    (FT_CharMap_CharNextFunc) Get_Next_Char
+    (FT_Face_GetAdvancesFunc) 0
   };
 
 
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index 5a6008d..64863de 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -427,8 +427,6 @@
       root->internal->max_contours = 0;
     }
 
-#ifdef FT_CONFIG_OPTION_USE_CMAPS
-
     {
       FT_Face  root = &face->root;
 
@@ -492,81 +490,6 @@
       }
     }
 
-#else /* !FT_CONFIG_OPTION_USE_CMAPS */
-
-    /* charmap support -- synthetize unicode charmap if possible */
-    {
-      FT_Face     root    = &face->root;
-      FT_CharMap  charmap = face->charmaprecs;
-
-
-      /* synthesize a Unicode charmap if there is support in the `PSNames' */
-      /* module                                                            */
-      if ( psnames )
-      {
-        if ( psnames->unicode_value )
-        {
-          error = psnames->build_unicodes(
-                    root->memory,
-                    face->type1.num_glyphs,
-                    (const char**)face->type1.glyph_names,
-                    &face->unicode_map );
-          if ( !error )
-          {
-            root->charmap        = charmap;
-            charmap->face        = (FT_Face)face;
-            charmap->encoding    = ft_encoding_unicode;
-            charmap->platform_id = 3;
-            charmap->encoding_id = 1;
-            charmap++;
-          }
-
-          /* simply clear the error in case of failure (which really) */
-          /* means that out of memory or no unicode glyph names       */
-          error = T1_Err_Ok;
-        }
-      }
-
-      /* now, support either the standard, expert, or custom encoding */
-      charmap->face        = (FT_Face)face;
-      charmap->platform_id = 7;  /* a new platform id for Adobe fonts? */
-
-      switch ( face->type1.encoding_type )
-      {
-      case T1_ENCODING_TYPE_STANDARD:
-        charmap->encoding    = ft_encoding_adobe_standard;
-        charmap->encoding_id = 0;
-        break;
-
-      case T1_ENCODING_TYPE_EXPERT:
-        charmap->encoding    = ft_encoding_adobe_expert;
-        charmap->encoding_id = 1;
-        break;
-
-      case T1_ENCODING_TYPE_ARRAY:
-        charmap->encoding    = ft_encoding_adobe_custom;
-        charmap->encoding_id = 2;
-        break;
-
-      case T1_ENCODING_TYPE_ISOLATIN1:
-        charmap->encoding    = ft_encoding_latin_1;
-        charmap->encoding_id = 3;
-        break;
-
-      default:
-        FT_ERROR(( "T1_Face_Init: invalid encoding\n" ));
-        error = T1_Err_Invalid_File_Format;
-        goto Exit;
-      }
-
-      root->charmaps     = face->charmaps;
-      root->num_charmaps = charmap - face->charmaprecs + 1;
-      face->charmaps[0]  = &face->charmaprecs[0];
-      face->charmaps[1]  = &face->charmaprecs[1];
-    }
-
-#endif /* !FT_CONFIG_OPTION_USE_CMAPS */
-
   Exit:
     return error;
   }
diff --git a/src/type42/t42drivr.c b/src/type42/t42drivr.c
index a053318..65bf2e8 100644
--- a/src/type42/t42drivr.c
+++ b/src/type42/t42drivr.c
@@ -61,10 +61,10 @@
     {
       FT_UInt  len = (FT_UInt)( ft_strlen( gname ) );
 
-  
+
       if ( len >= buffer_max )
         len = buffer_max - 1;
-        
+
       FT_MEM_COPY( buffer, gname, len );
       ((FT_Byte*)buffer)[len] = 0;
     }
@@ -158,14 +158,11 @@
     (FT_Size_ResetPointsFunc) T42_Size_SetChars,
     (FT_Size_ResetPixelsFunc) T42_Size_SetPixels,
     (FT_Slot_LoadFunc)        T42_GlyphSlot_Load,
-    (FT_CharMap_CharIndexFunc)T42_CMap_CharIndex,
 
     (FT_Face_GetKerningFunc)  0,
     (FT_Face_AttachFunc)      0,
 
-    (FT_Face_GetAdvancesFunc) 0,
-
-    (FT_CharMap_CharNextFunc) T42_CMap_CharNext,
+    (FT_Face_GetAdvancesFunc) 0
   };
 
 
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index 16211b6..3669d24 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -436,118 +436,6 @@
   }
 
 
-  FT_LOCAL_DEF( FT_UInt )
-  T42_CMap_CharIndex( FT_CharMap  charmap,
-                      FT_Long     charcode )
-  {
-    T42_Face         face;
-    FT_UInt          result = 0;
-    PSNames_Service  psnames;
-
-
-    face    = (T42_Face)charmap->face;
-    psnames = (PSNames_Service)face->psnames;
-    if (!psnames )
-      goto Exit;
-
-    switch ( charmap->encoding )
-    {
-      /*******************************************************************/
-      /*                                                                 */
-      /* Unicode encoding support                                        */
-      /*                                                                 */
-    case ft_encoding_unicode:
-      /* if this charmap is used, we ignore the encoding of the font and */
-      /* use the `PSNames' module to synthetize the Unicode charmap      */
-      result = psnames->lookup_unicode( &face->unicode_map,
-                                        (FT_ULong)charcode );
-
-      /* the function returns 0xFFFF if the Unicode charcode has */
-      /* no corresponding glyph                                  */
-      if ( result == 0xFFFFU )
-        result = 0;
-
-      /* The result returned is the index (position)in the CharStrings */
-      /* array.  This must be used now to get the value associated to  */
-      /* that glyph_name, which is the real index within the truetype  */
-      /* structure.                                                    */
-      result = ft_atoi( (const char*)face->type1.charstrings[result] );
-      goto Exit;
-
-      /*******************************************************************/
-      /*                                                                 */
-      /* ISOLatin1 encoding support                                      */
-      /*                                                                 */
-    case ft_encoding_latin_1:
-      /* ISOLatin1 is the first page of Unicode */
-      if ( charcode < 256 && psnames->unicode_value )
-      {
-        result = psnames->lookup_unicode( &face->unicode_map,
-                                          (FT_ULong)charcode );
-
-        /* the function returns 0xFFFF if the Unicode charcode has */
-        /* no corresponding glyph                                  */
-        if ( result == 0xFFFFU )
-          result = 0;
-      }
-      goto Exit;
-
-      /*******************************************************************/
-      /*                                                                 */
-      /* Custom Type 1 encoding                                          */
-      /*                                                                 */
-    case ft_encoding_adobe_custom:
-      {
-        T1_Encoding  encoding = &face->type1.encoding;
-
-
-        if ( charcode >= encoding->code_first &&
-             charcode <= encoding->code_last  )
-        {
-          FT_UInt idx = encoding->char_index[charcode];
-
-
-          result = ft_atoi( (const char *)face->type1.charstrings[idx] );
-        }
-        goto Exit;
-      }
-
-      /*******************************************************************/
-      /*                                                                 */
-      /* Adobe Standard & Expert encoding support                        */
-      /*                                                                 */
-    default:
-      if ( charcode < 256 )
-      {
-        FT_UInt      code;
-        FT_Int       n;
-        const char*  glyph_name;
-
-
-        code = psnames->adobe_std_encoding[charcode];
-        if ( charmap->encoding == ft_encoding_adobe_expert )
-          code = psnames->adobe_expert_encoding[charcode];
-
-        glyph_name = psnames->adobe_std_strings( code );
-        if ( !glyph_name )
-          break;
-
-        for ( n = 0; n < face->type1.num_glyphs; n++ )
-        {
-          const char*  gname = face->type1.glyph_names[n];
-
-          if ( gname && ( ft_strcmp( gname, glyph_name ) == 0 ) )
-          {
-            result = ft_atoi( (const char *)face->type1.charstrings[n] );
-            break;
-          }
-        }
-      }
-    }
-
-  Exit:
-    return result;
-  }
 
 
   FT_LOCAL_DEF( FT_Error )
@@ -744,101 +632,4 @@
   }
 
 
-
-  FT_LOCAL_DEF( FT_Long )
-  T42_CMap_CharNext( FT_CharMap  charmap,
-                     FT_Long     charcode )
-  {
-    T42_Face         face;
-    PSNames_Service  psnames;
-
-
-    face    = (T42_Face)charmap->face;
-    psnames = (PSNames_Service)face->psnames;
-
-    if ( psnames )
-      switch ( charmap->encoding )
-      {
-        /*******************************************************************/
-        /*                                                                 */
-        /* Unicode encoding support                                        */
-        /*                                                                 */
-      case ft_encoding_unicode:
-        /* use the `PSNames' module to synthetize the Unicode charmap */
-        return psnames->next_unicode( &face->unicode_map,
-                                      (FT_ULong)charcode );
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* ISOLatin1 encoding support                                      */
-        /*                                                                 */
-      case ft_encoding_latin_1:
-        {
-          FT_ULong code;
-
-
-          /* use the `PSNames' module to synthetize the Unicode charmap */
-          code = psnames->next_unicode( &face->unicode_map,
-                                        (FT_ULong)charcode );
-          if ( code < 256 )
-            return code;
-          break;
-        }
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* Custom Type 1 encoding                                          */
-        /*                                                                 */
-      case ft_encoding_adobe_custom:
-        {
-          T1_Encoding  encoding = &face->type1.encoding;
-
-
-          charcode++;
-          if ( charcode < encoding->code_first )
-            charcode = encoding->code_first;
-          while ( charcode <= encoding->code_last  ) {
-            if ( encoding->char_index[charcode] )
-              return charcode;
-            charcode++;
-          }
-        }
-
-
-        /*******************************************************************/
-        /*                                                                 */
-        /* Adobe Standard & Expert encoding support                        */
-        /*                                                                 */
-      default:
-        while ( ++charcode < 256 )
-        {
-          FT_UInt      code;
-          FT_Int       n;
-          const char*  glyph_name;
-
-
-          code = psnames->adobe_std_encoding[charcode];
-          if ( charmap->encoding == ft_encoding_adobe_expert )
-            code = psnames->adobe_expert_encoding[charcode];
-
-          glyph_name = psnames->adobe_std_strings( code );
-          if ( !glyph_name )
-            continue;
-
-          for ( n = 0; n < face->type1.num_glyphs; n++ )
-          {
-            const char*  gname = face->type1.glyph_names[n];
-
-
-            if ( gname && gname[0] == glyph_name[0]  &&
-                 ft_strcmp( gname, glyph_name ) == 0 )
-              return charcode;
-          }
-        }
-      }
-
-    return 0;
-  }
-
-
 /* END */
diff --git a/src/type42/t42objs.h b/src/type42/t42objs.h
index c6ce127..fceb811 100644
--- a/src/type42/t42objs.h
+++ b/src/type42/t42objs.h
@@ -109,15 +109,6 @@ FT_BEGIN_HEADER
   T42_GlyphSlot_Done( T42_GlyphSlot slot );
 
 
-  FT_LOCAL( FT_UInt )
-  T42_CMap_CharIndex( FT_CharMap  charmap,
-                      FT_Long     charcode );
-
-  FT_LOCAL( FT_Long )
-  T42_CMap_CharNext( FT_CharMap  charmap,
-                     FT_Long     charcode );
-
-
   FT_LOCAL( FT_Error )
   T42_Driver_Init( T42_Driver  driver );
 
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 54c0a97..48153a4 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -682,14 +682,9 @@
     (FT_Size_ResetPixelsFunc) FNT_Size_Set_Pixels,
     (FT_Slot_LoadFunc)        FNT_Load_Glyph,
 
-    (FT_CharMap_CharIndexFunc)0,
-
-
     (FT_Face_GetKerningFunc)  0,
     (FT_Face_AttachFunc)      0,
-    (FT_Face_GetAdvancesFunc) 0,
-
-    (FT_CharMap_CharNextFunc) 0
+    (FT_Face_GetAdvancesFunc) 0
   };