Commit 082f2faf5007812bac6a1f783c7dcc6f49d761fe

Werner Lemberg 2017-05-24T07:40:46

[bdf, pcf] Support ISO646.1991-IRV character encoding (aka ASCII). Problem reported by Marek Kašík <mkasik@redhat.com>, cf. https://bugzilla.redhat.com/show_bug.cgi?id=1451795 * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdrivr.c (PCF_Face_Init): Implement it.

diff --git a/ChangeLog b/ChangeLog
index 1f39aef..4d13109 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-05-24  Werner Lemberg  <wl@gnu.org>
+
+	[bdf, pcf] Support ISO646.1991-IRV character encoding (aka ASCII).
+
+	Problem reported by Marek Kašík <mkasik@redhat.com>, cf.
+
+	  https://bugzilla.redhat.com/show_bug.cgi?id=1451795
+
+	* src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdrivr.c
+	(PCF_Face_Init): Implement it.
+
 2017-05-20  Nikolaus Waxweiler  <madigens@gmail.com>
 
 	[truetype] Always use interpreter v35 for B/W rendering (#51051).
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index a2242be..c0a5a5c 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -545,7 +545,11 @@ THE SOFTWARE.
               if ( !ft_strcmp( s, "10646" )                      ||
                    ( !ft_strcmp( s, "8859" ) &&
                      !ft_strcmp( face->charset_encoding, "1" ) ) )
-              unicode_charmap = 1;
+                unicode_charmap = 1;
+              /* another name for ASCII */
+              else if ( !ft_strcmp( s, "646.1991" )                 &&
+                        !ft_strcmp( face->charset_encoding, "IRV" ) )
+                unicode_charmap = 1;
             }
 
             {
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index 9f4d36d..5053094 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -387,7 +387,11 @@ THE SOFTWARE.
           if ( !ft_strcmp( s, "10646" )                      ||
                ( !ft_strcmp( s, "8859" ) &&
                  !ft_strcmp( face->charset_encoding, "1" ) ) )
-          unicode_charmap = 1;
+            unicode_charmap = 1;
+          /* another name for ASCII */
+          else if ( !ft_strcmp( s, "646.1991" )                 &&
+                    !ft_strcmp( face->charset_encoding, "IRV" ) )
+            unicode_charmap = 1;
         }
       }