]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/sfnt.c (GETINFO): Implement undocumented selector bit 5.
authorPo Lu <luangruo@yahoo.com>
Thu, 21 Dec 2023 06:35:18 +0000 (14:35 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 21 Dec 2023 06:35:18 +0000 (14:35 +0800)
src/sfnt.c

index 4d377ddf5e565813810c88a35d2c8c9e8653df67..0e2308bcbac88d4d9ed3ffe9b75c3f132632750e 100644 (file)
@@ -7605,9 +7605,12 @@ sfnt_interpret_trap (struct sfnt_interpreter *interpreter,
     interpreter->state.scan_control = value;   \
   }
 
-/* Selector bit 8 is undocumented, but present in the Macintosh
+/* Selector bit 3 is undocumented, but present in the Macintosh
    rasterizer.  02000 is returned if there is a variation axis in
-   use.  */
+   use.
+
+   Selector bit 5 is undocumented, but relied on by several fonts.
+   010000 is returned if a grayscale rasterizer is in use.  */
 
 #define GETINFO()                              \
   {                                            \
@@ -7624,6 +7627,9 @@ sfnt_interpret_trap (struct sfnt_interpreter *interpreter,
        && interpreter->norm_coords)            \
       k |= 02000;                              \
                                                \
+    if (selector & 32)                         \
+      k |= 010000;                             \
+                                               \
     PUSH_UNCHECKED (k);                                \
   }