diff options
author | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2018-01-27 02:25:40 +0000 |
---|---|---|
committer | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2018-01-27 02:25:40 +0000 |
commit | 4f808c41f04167cf3b905cff41df95db8f791fe7 (patch) | |
tree | d592731c2b376e423100c6f14344d6bfb9b6278e /Build | |
parent | 0768b292de4868c7798b6823cdc407b2f9bf6973 (diff) |
dvipsk: support new JFM spec
git-svn-id: svn://tug.org/texlive/trunk@46455 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipsk/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/dvips.h | 2 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/tfmload.c | 18 |
3 files changed, 21 insertions, 4 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index 2b15cc23e53..00322087dc6 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,8 @@ +2018-01-27 Hironobu Yamashita <h.y.acetaminophen@gmail.com> + + * tfmload.c, dvips.h: Support new JFM spec (3-byte characters + in TYPE > 0). + 2017-05-19 Karl Berry <karl@tug.org> * Version 5.997 for TeX Live 2017 release. diff --git a/Build/source/texk/dvipsk/dvips.h b/Build/source/texk/dvipsk/dvips.h index bf3d55b0ec5..212be482ebb 100644 --- a/Build/source/texk/dvipsk/dvips.h +++ b/Build/source/texk/dvipsk/dvips.h @@ -91,8 +91,10 @@ extern char *sprintf(); */ #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; diff --git a/Build/source/texk/dvipsk/tfmload.c b/Build/source/texk/dvipsk/tfmload.c index b858951204c..e93e815ef91 100644 --- a/Build/source/texk/dvipsk/tfmload.c +++ b/Build/source/texk/dvipsk/tfmload.c @@ -100,6 +100,15 @@ tfm16(void) 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 @@ tfmload(register fontdesctype *curfnt) 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 @@ tfmload(register fontdesctype *curfnt) 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; |