summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/kanji/kmapping.ps
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlgs/kanji/kmapping.ps')
-rw-r--r--Master/tlpkg/tlgs/kanji/kmapping.ps155
1 files changed, 155 insertions, 0 deletions
diff --git a/Master/tlpkg/tlgs/kanji/kmapping.ps b/Master/tlpkg/tlgs/kanji/kmapping.ps
new file mode 100644
index 00000000000..9c3c94232df
--- /dev/null
+++ b/Master/tlpkg/tlgs/kanji/kmapping.ps
@@ -0,0 +1,155 @@
+%
+% Mapping from character names to Kanji JIS code
+%
+% Apr.10,1992 Written by N.Katayama
+%
+
+%
+% JIS
+%
+
+/JISMappingDict 94 dict begin
+ 3 string dup 0 (c) putinterval dup 1 2 getinterval
+ 16#21 1 16#7E {
+ dup 16 3 index cvrs pop
+ 2 index cvn exch def
+ } for
+ pop pop
+currentdict end readonly def
+
+%
+% Shift JIS
+%
+
+/SJMappingDict 188 dict begin
+ 3 string dup 0 (c) putinterval dup 1 2 getinterval
+ 16#40 1 16#7E {
+ dup 16 3 index cvrs pop
+ 16#40 sub 16#21 add
+ 2 index cvn exch def
+ } for
+ 16#80 1 16#9E {
+ dup 16 3 index cvrs pop
+ 16#80 sub 16#60 add
+ 2 index cvn exch def
+ } for
+ 16#9F 1 16#FC {
+ dup 16 3 index cvrs pop
+ 16#9F sub 16#0121 add
+ 2 index cvn exch def
+ } for
+ pop pop
+currentdict end readonly def
+
+%
+% Character Name Mapping
+%
+
+/CNameMappingDict 512 dict begin
+%
+% Symbols
+%
+/space 16#2121 def /jcomma 16#2122 def
+/jperiod 16#2123 def /comma 16#2124 def
+/period 16#2125 def /periodcentered 16#2126 def
+/colon 16#2127 def /semicolon 16#2128 def
+/question 16#2129 def /exclam 16#212A def
+/jvoiced 16#212B def /jsemivoiced 16#212C def
+%
+/asciicircum 16#2130 def /overline 16#2131 def
+/underscore 16#2132 def
+%
+/jprolonged 16#213C def /hyphen 16#213D def
+%
+/slash 16#213F def /backslash 16#2140 def
+%
+/bar 16#2143 def
+%
+/quoteleft 16#2146 def /quoteright 16#2147 def
+%
+/quotedbl 16#2149 def
+/parenleft 16#214A def /parenright 16#214B def
+%
+/bracketleft 16#214E def /bracketright 16#214F def
+/braceleft 16#2150 def /braceright 16#2151 def
+%
+/jbracketleft 16#2156 def /jbracketright 16#2157 def
+%
+/plus 16#215C def /minus 16#215D def
+%
+/equal 16#2161 def
+%
+/less 16#2163 def /greater 16#2164 def
+%
+/yen 16#216F def /dollar 16#2170 def
+%
+/percent 16#2173 def /numbersign 16#2174 def
+/ampersand 16#2175 def /asterisk 16#2176 def
+/at 16#2177 def
+%
+% Digits
+%
+[
+/zero /one /two /three /four /five /six /seven /eight /nine
+] 16#2330 1 16#2339 { 2 copy 16#2330 sub get exch def } for pop
+%
+% Alphabets
+%
+[
+/A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z
+] 16#2341 1 16#235A { 2 copy 16#2341 sub get exch def } for pop
+%
+[
+/a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z
+] 16#2361 1 16#237A { 2 copy 16#2361 sub get exch def } for pop
+%
+% Hiragana
+%
+[
+/asmallgana /agana /ismallgana /igana /usmallgana /ugana
+/esmallgana /egana /osmallgana /ogana
+/kagana /gagana /kigana /gigana /kugana /gugana
+/kegana /gegana /kogana /gogana
+/sagana /zagana /shigana /jigana /sugana /zugana
+/segana /zegana /sogana /zogana
+/tagana /dagana /chigana /digana /tsusmallgana /tsugana /dugana
+/tegana /degana /togana /dogana
+/nagana /nigana /nugana /negana /nogana
+/hagana /bagana /pagana /higana /bigana /pigana /fugana /bugana /pugana
+/hegana /begana /pegana /hogana /bogana /pogana
+/magana /migana /mugana /megana /mogana
+/yasmallgana /yagana /yusmallgana /yugana /yosmallgana /yogana
+/ragana /rigana /rugana /regana /rogana
+/wasmallgana /wagana /wigana /yegana /wogana /ngana
+] 16#2421 1 16#2473 { 2 copy 16#2421 sub get exch def } for pop
+%
+% Katakana
+%
+[
+/asmallkana /akana /ismallkana /ikana /usmallkana /ukana
+/esmallkana /ekana /osmallkana /okana
+/kakana /gakana /kikana /gikana /kukana /gukana
+/kekana /gekana /kokana /gokana
+/sakana /zakana /shikana /jikana /sukana /zukana
+/sekana /zekana /sokana /zokana
+/takana /dakana /chikana /dikana /tsusmallkana /tsukana /dukana
+/tekana /dekana /tokana /dokana
+/nakana /nikana /nukana /nekana /nokana
+/hakana /bakana /pakana /hikana /bikana /pikana /fukana /bukana /pukana
+/hekana /bekana /pekana /hokana /bokana /pokana
+/makana /mikana /mukana /mekana /mokana
+/yasmallkana /yakana /yusmallkana /yukana /yosmallkana /yokana
+/rakana /rikana /rukana /rekana /rokana
+/wasmallkana /wakana /wikana /yekana /wokana /nkana
+/vukana /kasmallkana /kesmallkana
+] 16#2521 1 16#2576 { 2 copy 16#2521 sub get exch def } for pop
+currentdict end readonly def
+
+%
+% Mapping procedure
+%
+
+/StandardMapping {
+ Private /MappingDict get exch 2 copy known
+ { get Private /MappingOffset get add }{ pop pop 16#2121 } ifelse
+} def