7 local f = io.open('IVD_Sequences.txt')
8 local t, maxcid = {}, 0
13 elseif s:match('Adobe.Japan.') then
14 local c1,c2,c3 = s:match('(%x+)%s+(%x+);%s+Adobe.Japan.;%s+CID%+(%d+)')
15 c1, c2, c3 = tonumber(c1, 16), tonumber(c2, 16), tonumber(c3)
16 if c2 and c2>=0xE0100 then
18 if maxcid<c3 then maxcid = c3 end
19 t[c3] = c2*0x200000+c1
28 s[#s+1] = t[i] and string.format('0x%x', t[i]) or 'f'
29 if #s==10 then print(" " .. table.concat(s, ",") .. ','); s={} end
31 print(" " .. table.concat(s, ","))
33 -- ( echo 'luatexja.otf.ivd_aj1 = {' ; grep 'Adobe-Japan1' IVD_Sequences.txt|sed 's/\([0-9A-F][0-9A-F]*\) \([0-9A-F][0-9A-F]*\)\;.*CID.\([0-9][0-9]*\)$/[\3]=\{0x\1,0x\2\},/' ; echo '}' )