6 local f = io.open('IVD_Sequences.txt')
7 local t, maxcid = {}, 0
12 elseif s:match('Adobe.Japan.') then
13 local c1,c2,c3 = s:match('(%x+)%s+(%x+);%s+Adobe.Japan.;%s+CID%+(%d+)')
14 c1, c2, c3 = tonumber(c1, 16), tonumber(c2, 16), tonumber(c3)
15 if c2 and c2>=0xE0100 then
17 if maxcid<c3 then maxcid = c3 end
18 t[c3] = c2*0x200000+c1
26 print(' ' .. tostring(t[i] or false) .. ',')
30 -- ( 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 '}' )