texlive[44053] Build/source/texk/dvipdfm-x: dvipdfm-x: support more

commits+kakuto at tug.org commits+kakuto at tug.org
Wed Apr 26 05:09:19 CEST 2017


Revision: 44053
          http://tug.org/svn/texlive?view=revision&revision=44053
Author:   kakuto
Date:     2017-04-26 05:09:18 +0200 (Wed, 26 Apr 2017)
Log Message:
-----------
dvipdfm-x: support more length units (from Paul Vojta)

Modified Paths:
--------------
    trunk/Build/source/texk/dvipdfm-x/ChangeLog
    trunk/Build/source/texk/dvipdfm-x/dvi.c
    trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c
    trunk/Build/source/texk/dvipdfm-x/spc_html.c
    trunk/Build/source/texk/dvipdfm-x/spc_util.c

Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog	2017-04-26 02:17:22 UTC (rev 44052)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog	2017-04-26 03:09:18 UTC (rev 44053)
@@ -1,3 +1,8 @@
+2017-04-26  Paul Vojta  <vojta at math.berkeley.edu>
+
+	* dvi.c, dvipdfmx.c, spc_html.c, spc_util.c: Support additional
+	length units.
+
 2017-04-16  Shunsaku Hirata  <shunsaku.hirata74 at gmail.com>
 
 	* tt_cmap.c: Fix a bug that generation of GID to CID mapping for

Modified: trunk/Build/source/texk/dvipdfm-x/dvi.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/dvi.c	2017-04-26 02:17:22 UTC (rev 44052)
+++ trunk/Build/source/texk/dvipdfm-x/dvi.c	2017-04-26 03:09:18 UTC (rev 44053)
@@ -2157,7 +2157,11 @@
 #define K_UNIT__CM  2
 #define K_UNIT__MM  3
 #define K_UNIT__BP  4
-    "pt", "in", "cm", "mm", "bp",
+#define K_UNIT__PC  5
+#define K_UNIT__DD  6
+#define K_UNIT__CC  7
+#define K_UNIT__SP  8
+    "pt", "in", "cm", "mm", "bp", "pc", "dd", "cc", "sp",
      NULL
   };
   int     k, error = 0;
@@ -2193,6 +2197,10 @@
       case K_UNIT__CM: u *= 72.0 / 2.54 ; break;
       case K_UNIT__MM: u *= 72.0 / 25.4 ; break;
       case K_UNIT__BP: u *= 1.0 ; break;
+      case K_UNIT__PC: u *= 12.0 * 72.0 / 72.27 ; break;
+      case K_UNIT__DD: u *= 1238.0 / 1157.0 * 72.0 / 72.27 ; break;
+      case K_UNIT__CC: u *= 12.0 * 1238.0 / 1157.0 * 72.0 / 72.27 ; break;
+      case K_UNIT__SP: u *= 72.0 / (72.27 * 65536) ; break;
       default:
         WARN("Unknown unit of measure: %s", q);
         error = -1;

Modified: trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c	2017-04-26 02:17:22 UTC (rev 44052)
+++ trunk/Build/source/texk/dvipdfm-x/dvipdfmx.c	2017-04-26 03:09:18 UTC (rev 44053)
@@ -257,7 +257,11 @@
 #define K_UNIT__CM  2
 #define K_UNIT__MM  3
 #define K_UNIT__BP  4
-    "pt", "in", "cm", "mm", "bp",
+#define K_UNIT__PC  5
+#define K_UNIT__DD  6
+#define K_UNIT__CC  7
+#define K_UNIT__SP  8
+    "pt", "in", "cm", "mm", "bp", "pc", "dd", "cc", "sp",
      NULL
   };
   int     k, error = 0;
@@ -292,6 +296,10 @@
       case K_UNIT__CM: u *= 72.0 / 2.54 ; break;
       case K_UNIT__MM: u *= 72.0 / 25.4 ; break;
       case K_UNIT__BP: u *= 1.0 ; break;
+      case K_UNIT__PC: u *= 12.0 * 72.0 / 72.27 ; break;
+      case K_UNIT__DD: u *= 1238.0 / 1157.0 * 72.0 / 72.27 ; break;
+      case K_UNIT__CC: u *= 12.0 * 1238.0 / 1157.0 * 72.0 / 72.27 ; break;
+      case K_UNIT__SP: u *= 72.0 / (72.27 * 65536) ; break;
       default:
         WARN("Unknown unit of measure: %s", q);
         error = -1;

Modified: trunk/Build/source/texk/dvipdfm-x/spc_html.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/spc_html.c	2017-04-26 02:17:22 UTC (rev 44052)
+++ trunk/Build/source/texk/dvipdfm-x/spc_html.c	2017-04-26 03:09:18 UTC (rev 44053)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2002-2017 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -486,8 +486,12 @@
 #define K_UNIT__CM  2
 #define K_UNIT__MM  3
 #define K_UNIT__BP  4
-    "pt", "in", "cm", "mm", "bp",
-#define K_UNIT__PX  5
+#define K_UNIT__PC  5
+#define K_UNIT__DD  6
+#define K_UNIT__CC  7
+#define K_UNIT__SP  8
+    "pt", "in", "cm", "mm", "bp", "pc", "dd", "cc", "sp",
+#define K_UNIT__PX  9
     "px",
      NULL
   };
@@ -511,6 +515,10 @@
     case K_UNIT__CM: u *= 72.0 / 2.54 ; break;
     case K_UNIT__MM: u *= 72.0 / 25.4 ; break;
     case K_UNIT__BP: u *= 1.0 ; break;
+    case K_UNIT__PC: u *= 12.0 * 72.0 / 72.27 ; break;
+    case K_UNIT__DD: u *= 1238.0 / 1157.0 * 72.0 / 72.27 ; break;
+    case K_UNIT__CC: u *= 12.0 * 1238.0 / 1157.0 * 72.0 / 72.27 ; break;
+    case K_UNIT__SP: u *= 72.0 / (72.27 * 65536) ; break;
     case K_UNIT__PX: u *= 1.0 ; break; /* 72dpi */
     default:
       WARN("Unknown unit of measure: %s", q);

Modified: trunk/Build/source/texk/dvipdfm-x/spc_util.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/spc_util.c	2017-04-26 02:17:22 UTC (rev 44052)
+++ trunk/Build/source/texk/dvipdfm-x/spc_util.c	2017-04-26 03:09:18 UTC (rev 44053)
@@ -1,6 +1,6 @@
 /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
 
-    Copyright (C) 2007-2016 by Jin-Hwan Cho and Shunsaku Hirata,
+    Copyright (C) 2007-2017 by Jin-Hwan Cho and Shunsaku Hirata,
     the dvipdfmx project team.
     
     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks at kettering.edu>
@@ -290,7 +290,11 @@
 #define K_UNIT__CM  2
 #define K_UNIT__MM  3
 #define K_UNIT__BP  4
-    "pt", "in", "cm", "mm", "bp", NULL
+#define K_UNIT__PC  5
+#define K_UNIT__DD  6
+#define K_UNIT__CC  7
+#define K_UNIT__SP  8
+    "pt", "in", "cm", "mm", "bp", "pc", "dd", "cc", "sp", NULL
   };
   int     k, error = 0;
 
@@ -325,6 +329,10 @@
       case K_UNIT__CM: u *= 72.0 / 2.54 ; break;
       case K_UNIT__MM: u *= 72.0 / 25.4 ; break;
       case K_UNIT__BP: u *= 1.0 ; break;
+      case K_UNIT__PC: u *= 12.0 * 72.0 / 72.27 ; break;
+      case K_UNIT__DD: u *= 1238.0 / 1157.0 * 72.0 / 72.27 ; break;
+      case K_UNIT__CC: u *= 12.0 * 1238.0 / 1157.0 * 72.0 / 72.27 ; break;
+      case K_UNIT__SP: u *= 72.0 / (72.27 * 65536) ; break;
       default:
         spc_warn(spe, "Unknown unit of measure: %s", q);
         error = -1;



More information about the tex-live-commits mailing list