texlive[46455] Build/source/texk/dvipsk: dvipsk: support new JFM spec
commits+hironobu at tug.org
commits+hironobu at tug.org
Sat Jan 27 03:25:42 CET 2018
Revision: 46455
http://tug.org/svn/texlive?view=revision&revision=46455
Author: hironobu
Date: 2018-01-27 03:25:40 +0100 (Sat, 27 Jan 2018)
Log Message:
-----------
dvipsk: support new JFM spec
Modified Paths:
--------------
trunk/Build/source/texk/dvipsk/ChangeLog
trunk/Build/source/texk/dvipsk/dvips.h
trunk/Build/source/texk/dvipsk/tfmload.c
Modified: trunk/Build/source/texk/dvipsk/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipsk/ChangeLog 2018-01-27 02:25:02 UTC (rev 46454)
+++ trunk/Build/source/texk/dvipsk/ChangeLog 2018-01-27 02:25:40 UTC (rev 46455)
@@ -1,3 +1,8 @@
+2018-01-27 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
+
+ * tfmload.c, dvips.h: Support new JFM spec (3-byte characters
+ in TYPE > 0).
+
2017-05-19 Karl Berry <karl at tug.org>
* Version 5.997 for TeX Live 2017 release.
Modified: trunk/Build/source/texk/dvipsk/dvips.h
===================================================================
--- trunk/Build/source/texk/dvipsk/dvips.h 2018-01-27 02:25:02 UTC (rev 46454)
+++ trunk/Build/source/texk/dvipsk/dvips.h 2018-01-27 02:25:40 UTC (rev 46455)
@@ -91,8 +91,10 @@
*/
#if (defined(MSDOS) && !defined(DJGPP)) || (defined(OS2) && defined(_MSC_VER)) || defined(ATARIST)
typedef long integer;
+typedef unsigned long uinteger;
#else
typedef int integer;
+typedef unsigned int uinteger;
#endif
#ifndef KPATHSEA
typedef char boolean;
Modified: trunk/Build/source/texk/dvipsk/tfmload.c
===================================================================
--- trunk/Build/source/texk/dvipsk/tfmload.c 2018-01-27 02:25:02 UTC (rev 46454)
+++ trunk/Build/source/texk/dvipsk/tfmload.c 2018-01-27 02:25:40 UTC (rev 46455)
@@ -100,6 +100,15 @@
return ( a * 256 + tfmbyte () );
}
+uinteger
+tfm24_kanji(void)
+{
+ register uinteger a;
+ a = tfmbyte ();
+ a = a * 256 + tfmbyte ();
+ return ( a + tfmbyte () * 65536 );
+}
+
integer
tfm32(void)
{
@@ -119,7 +128,7 @@
integer nw, hd;
integer bc, ec;
integer nco=0, ncw=0, npc=0, no_repeats = 0;
- halfword *index = NULL;
+ uinteger *index = NULL;
halfword *chartype = NULL;
integer *scaled;
integer *chardat;
@@ -189,13 +198,14 @@
chardat = (integer *)xmalloc(256*sizeof(integer));
for (i=2; i<hd; i++)
li = tfm32();
- index = (halfword *)malloc(nt * sizeof(halfword));
+ index = (uinteger *)malloc(nt * sizeof(uinteger));
chartype = (halfword *)malloc(nt * sizeof(halfword));
li = tfm16();
li = tfm16();
for (i=1; i<nt; i++) {
- index[i] = tfm16();
- chartype[i] = tfm16();
+ /* support new JFM spec by texjporg */
+ index[i] = tfm24_kanji();
+ chartype[i] = tfmbyte();
}
for (i=0; i<256; i++)
chardat[i] = 256;
More information about the tex-live-commits
mailing list