~ubuntu-branches/ubuntu/lucid/vflib3/lucid

« back to all changes in this revision

Viewing changes to src/mjk.el

  • Committer: Bazaar Package Importer
  • Author(s): Masayuki Hatta
  • Date: 2002-04-15 12:10:24 UTC
  • Revision ID: james.westby@ubuntu.com-20020415121024-cann32wucyfbq22f
Tags: upstream-3.6.12
ImportĀ upstreamĀ versionĀ 3.6.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(defun map-mjk-ttf (cp)
 
2
  (let ((g (/ cp (* 94 60)))
 
3
        (c (mod cp (* 94 60))))
 
4
    (if (= c 0)
 
5
        (progn
 
6
          (setq g (+ g 100)) 
 
7
          (setq c (* 94 60)))
 
8
        (setq g (+ g 101)))
 
9
    (let ((c1 (/ (- c 1) 94))
 
10
          (c2 (mod (- c 1) 94)))
 
11
      (if (< c1 30)
 
12
          (setq c1 (+ c1 16))
 
13
          (setq c1 (+ c1 18)))
 
14
      (list (- g 101)
 
15
            (format "0x%x" (+ (* (+ c1 32) 256) c2 33)) ))))
 
16
(map-mjk-ttf 1)
 
17
(map-mjk-ttf 2)
 
18
(map-mjk-ttf 10)
 
19
(map-mjk-ttf 2820)
 
20
(map-mjk-ttf 2900)
 
21
(map-mjk-ttf 5639)
 
22
(map-mjk-ttf 5640)
 
23
(map-mjk-ttf 5641)
 
24
(map-mjk-ttf 102144)
 
25
 
 
26
 
 
27
(defun map-mjk-type1 (cp)
 
28
  (let ((g (/ cp (* 94 60)))
 
29
        (c (mod cp (* 94 60))))
 
30
    (if (= c 0)
 
31
        (progn
 
32
          (setq g (+ g 100)) 
 
33
          (setq c (* 94 60)))
 
34
        (setq g (+ g 101)))
 
35
    (if (> c 2820)
 
36
        (setq c (+ c 380)) 
 
37
        (setq c (+ c 192)))
 
38
    (list (- g 101) (/ c 256) (format "0x%x" (mod c 256)))))
 
39
(map-mjk-type1 1)
 
40
(map-mjk-type1 2)
 
41
(map-mjk-type1 63)
 
42
(map-mjk-type1 64)
 
43
(map-mjk-type1 65)
 
44
(map-mjk-type1 319)
 
45
(map-mjk-type1 320)
 
46
(map-mjk-type1 2820)
 
47
(map-mjk-type1 2821)
 
48
(map-mjk-type1 5639)
 
49
(map-mjk-type1 5640)
 
50
(map-mjk-type1 5641)
 
51
(map-mjk-type1 5642)
 
52
(map-mjk-type1 5643)
 
53
(map-mjk-type1 (+ (* 7 16) 5888 12))
 
54
(map-mjk-type1 (+ (* 7 16) 5888 13))
 
55
(map-mjk-type1 (+ (* 7 16) 5888 14))
 
56
(map-mjk-type1 (+ (* 7 16) 5888 15))
 
57
(map-mjk-type1 (+ (* 7 16) 5888 16))