* src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding.

FreeType only sets a default active encoding for Unicode.
diff --git a/ChangeLog b/ChangeLog
index fe0f795..74dc50f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2017-06-13  Werner Lemberg  <wl@gnu.org>
 
+	* src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding.
+
+	FreeType only sets a default active encoding for Unicode.
+
+2017-06-13  Werner Lemberg  <wl@gnu.org>
+
 	[cff, truetype] Integer overflows.
 
 	Reported as
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index bd7f6a3..bb59d09 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -575,7 +575,8 @@
   /* <Note>                                                                */
   /*    When a new face is created (either through @FT_New_Face or         */
   /*    @FT_Open_Face), the library looks for a Unicode charmap within     */
-  /*    the list and automatically activates it.                           */
+  /*    the list and automatically activates it.  If there is no Unicode   */
+  /*    charmap, FreeType doesn't set an `active' charmap.                 */
   /*                                                                       */
   /* <Also>                                                                */
   /*    See @FT_CharMapRec for the publicly accessible fields of a given   */
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index c7b9b41..09cb489 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -658,12 +658,6 @@
               }
 
               error = FT_CMap_New( &bdf_cmap_class, NULL, &charmap, NULL );
-
-#if 0
-              /* Select default charmap */
-              if ( bdfface->num_charmaps )
-                bdfface->charmap = bdfface->charmaps[0];
-#endif
             }
 
             goto Exit;
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index 5053094..169f75e 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -413,12 +413,6 @@
         }
 
         error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL );
-
-#if 0
-        /* Select default charmap */
-        if ( pcfface->num_charmaps )
-          pcfface->charmap = pcfface->charmaps[0];
-#endif
       }
     }
 
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index 4b1703f..514af80 100644
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -264,12 +264,6 @@
         charmap.encoding    = FT_ENCODING_UNICODE;
 
         error = FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
-
-#if 0
-        /* select default charmap */
-        if ( pfrface->num_charmaps )
-          pfrface->charmap = pfrface->charmaps[0];
-#endif
       }
 
       /* check whether we have loaded any kerning pairs */
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index ac2e620..3f54d5d 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -1482,15 +1482,6 @@
 
           charmap->encoding = sfnt_find_encoding( charmap->platform_id,
                                                   charmap->encoding_id );
-
-#if 0
-          if ( !root->charmap                           &&
-               charmap->encoding == FT_ENCODING_UNICODE )
-          {
-            /* set 'root->charmap' to the first Unicode encoding we find */
-            root->charmap = charmap;
-          }
-#endif
         }
       }
 
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index 97c16b0..5ac1292 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -555,12 +555,6 @@
 
         if ( clazz )
           error = FT_CMap_New( clazz, NULL, &charmap, NULL );
-
-#if 0
-        /* Select default charmap */
-        if (root->num_charmaps)
-          root->charmap = root->charmaps[0];
-#endif
       }
     }
 
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index 87e5206..1c4ebd7 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -394,12 +394,6 @@
 
         if ( clazz )
           error = FT_CMap_New( clazz, NULL, &charmap, NULL );
-
-#if 0
-        /* Select default charmap */
-        if ( root->num_charmaps )
-          root->charmap = root->charmaps[0];
-#endif
       }
     }
   Exit:
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 9811fbb..5cdb85a 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -859,10 +859,6 @@
                              NULL );
         if ( error )
           goto Fail;
-
-        /* Select default charmap */
-        if ( root->num_charmaps )
-          root->charmap = root->charmaps[0];
       }
 
       /* set up remaining flags */