File: mjk.el

package info (click to toggle)
vflib3 3.6.14.dfsg-3+nmu3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 11,536 kB
  • ctags: 3,710
  • sloc: ansic: 35,811; sh: 10,357; asm: 3,290; makefile: 962; lisp: 123; perl: 109; awk: 43
file content (57 lines) | stat: -rw-r--r-- 1,293 bytes parent folder | download | duplicates (9)
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
(defun map-mjk-ttf (cp)
  (let ((g (/ cp (* 94 60)))
	(c (mod cp (* 94 60))))
    (if (= c 0)
	(progn
	  (setq g (+ g 100)) 
	  (setq c (* 94 60)))
	(setq g (+ g 101)))
    (let ((c1 (/ (- c 1) 94))
	  (c2 (mod (- c 1) 94)))
      (if (< c1 30)
	  (setq c1 (+ c1 16))
	  (setq c1 (+ c1 18)))
      (list (- g 101)
	    (format "0x%x" (+ (* (+ c1 32) 256) c2 33)) ))))
(map-mjk-ttf 1)
(map-mjk-ttf 2)
(map-mjk-ttf 10)
(map-mjk-ttf 2820)
(map-mjk-ttf 2900)
(map-mjk-ttf 5639)
(map-mjk-ttf 5640)
(map-mjk-ttf 5641)
(map-mjk-ttf 102144)


(defun map-mjk-type1 (cp)
  (let ((g (/ cp (* 94 60)))
	(c (mod cp (* 94 60))))
    (if (= c 0)
	(progn
	  (setq g (+ g 100)) 
	  (setq c (* 94 60)))
	(setq g (+ g 101)))
    (if (> c 2820)
	(setq c (+ c 380)) 
	(setq c (+ c 192)))
    (list (- g 101) (/ c 256) (format "0x%x" (mod c 256)))))
(map-mjk-type1 1)
(map-mjk-type1 2)
(map-mjk-type1 63)
(map-mjk-type1 64)
(map-mjk-type1 65)
(map-mjk-type1 319)
(map-mjk-type1 320)
(map-mjk-type1 2820)
(map-mjk-type1 2821)
(map-mjk-type1 5639)
(map-mjk-type1 5640)
(map-mjk-type1 5641)
(map-mjk-type1 5642)
(map-mjk-type1 5643)
(map-mjk-type1 (+ (* 7 16) 5888 12))
(map-mjk-type1 (+ (* 7 16) 5888 13))
(map-mjk-type1 (+ (* 7 16) 5888 14))
(map-mjk-type1 (+ (* 7 16) 5888 15))
(map-mjk-type1 (+ (* 7 16) 5888 16))