1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
%#!luatex
\input luatexja.sty
\catcode\endlinechar=12
\catcode`\ =12
\catcode`\%=12
\catcode`\#=12
\directlua{
local f = io.open("zero_search.pl", "w")
if f then
function OUT(s) f:write(s .. string.char(10)) end
else
function OUT(s) end
end
local jisx0208 = luatexja.base.load_cache('ltj-jisx0208',
function() return false end)
local utf = unicode.utf8
OUT([[
(COMMENT THIS IS A KANJI FORMAT FILE)
(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
(CHECKSUM O 0)
(FONTDIMEN
(SLANT R 0.0)
(SPACE R 0.0)
(STRETCH R 0.0)
(SHRINK R 0.0)
(XHEIGHT R 1.0)
(QUAD R 1.0)
(EXTRASPACE R 0.0)
(EXTRASTRETCH R 0.0)
(EXTRASHRINK R 0.0)
)]])
local CNT=96
local r = {}
for i=1,94 do
for j=1,94 do
if not ((i>0x08 and i<0x10) or i>0x54) then
local t = math.random( ((i>0x40) and 0 or 1), CNT-1)
r[t] = r[t] or {}
table.insert(r[t],0x2020+i*256+j)
end
end
end
local floor = math.floor
for i=1,CNT-1 do
if #(r[i])>0 then
table.sort(r[i])
OUT("(CHARSINTYPE D " .. tostring(i))
local s, k = " ", 0
for j=1,#(r[i]) do
local f = r[i][j]
k, s = k+1, s .. 'J ' .. string.format("%04X",f)
if k%10==0 then OUT(s); s = " " else s = s .. " " end
end
if k%10>0 then OUT(s) end
OUT(" )")
end
end
for i=0,CNT-1 do
if #(r[i])>0 then
OUT("(TYPE D " .. tostring(i))
OUT(" (CHARWD R " .. tostring(1+i/100) .. ")")
OUT(" (CHARHT R 0.88)")
OUT(" (CHARDP R 0.12)")
OUT(" )")
end
end
f:close()
}
\bye
|