texlive[69697] Build/source/texk/web2c/luatexdir: Character index

commits+lscarso at tug.org commits+lscarso at tug.org
Sun Feb 4 10:26:11 CET 2024


Revision: 69697
          https://tug.org/svn/texlive?view=revision&revision=69697
Author:   lscarso
Date:     2024-02-04 10:26:11 +0100 (Sun, 04 Feb 2024)
Log Message:
-----------
Character index within the  limits in defining a Type 3 font (H.Hagen). Thanks M. Chernoff.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/luatexdir/ChangeLog
    trunk/Build/source/texk/web2c/luatexdir/font/writet3.c
    trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h

Modified: trunk/Build/source/texk/web2c/luatexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2024-02-04 06:37:26 UTC (rev 69696)
+++ trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2024-02-04 09:26:11 UTC (rev 69697)
@@ -1,5 +1,9 @@
+2024-04-24  Luigi Scarso <luigi.scarso at gmail.com>
+	* Character index within the  limits in defining a Type 3 font (H.Hagen). Thanks M. Chernoff.
+
+	
 2024-03-24  Luigi Scarso <luigi.scarso at gmail.com>
-	* Ensures that setgentounicode has a glyph_unicode_tree not NULL
+	* Ensures that setgentounicode has a glyph_unicode_tree not NULL (thanks M. Chernoff)
 
 2024-01-24  Luigi Scarso <luigi.scarso at gmail.com>
         * New 	kpse.in_name_ok_silent_extended and kpse.in_name_ok_silent_extended

Modified: trunk/Build/source/texk/web2c/luatexdir/font/writet3.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/font/writet3.c	2024-02-04 06:37:26 UTC (rev 69696)
+++ trunk/Build/source/texk/web2c/luatexdir/font/writet3.c	2024-02-04 09:26:11 UTC (rev 69697)
@@ -227,6 +227,15 @@
     int first_char, last_char;
     int pk_font_scale;
     int tounicode_objnum = 0;
+    int bc = font_bc(f);
+    int ec = font_ec(f); 
+    if (bc > 255) { 
+        bc = 255;
+    }
+    if (ec > 255) { 
+        formatted_warning("font", "discarding characters above 255 in type 3 font '%s' in write", font_name(f));
+        ec = 255;
+    }
     pdffloat pf;
     boolean is_notdef;
     t3_glyph_num = 0;
@@ -237,13 +246,13 @@
     xfree(t3_buffer);
     t3_curbyte = 0;
     t3_size = 0;
-    for (i = font_bc(f); i <= font_ec(f); i++) {
+    for (i = bc; i <= ec; i++) {
         if (pdf_char_marked(f, i)) {
             break;
         }
     }
     first_char = i;
-    for (i = font_ec(f); i > first_char; i--) {
+    for (i = ec; i > first_char; i--) {
         if (pdf_char_marked(f, i)) {
             break;
         }
@@ -439,8 +448,17 @@
 {
     int callback_id = callback_defined(provide_charproc_data_callback);
     if (callback_id > 0) {
+        int bc = font_bc(f);
+        int ec = font_ec(f); 
+        if (bc > 255) { 
+            bc = 255;
+        }
+        if (ec > 255) { 
+            formatted_warning("font", "discarding characters above 255 in type 3 font '%s' in preroll", font_name(f));
+            ec = 255;
+        }
         int i;
-        for (i = font_bc(f); i <= font_ec(f); i++) {
+        for (i = bc; i <= ec; i++) {
             if (pdf_char_marked(f, i)) {
                 /*tex We pass |true|, the font id and the character index. */
                 run_callback(callback_id, "ddd->", 1, f, i);

Modified: trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2024-02-04 06:37:26 UTC (rev 69696)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2024-02-04 09:26:11 UTC (rev 69697)
@@ -1,4 +1,4 @@
 #ifndef luatex_svn_revision_h
 #define luatex_svn_revision_h
-#define luatex_svn_revision 7602
+#define luatex_svn_revision 7603
 #endif



More information about the tex-live-commits mailing list.