aboutsummaryrefslogtreecommitdiff
path: root/main.go
blob: 7e65b9da5e67a3512ee80360e36cd96b21df0a23 (plain)
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
package main

import "fmt"

var selector = map[string]string{
	/*
	"Gothic English Triplex": "gothgbt.hmp",
	"Gothic German Triplex":  "gothgrt.hmp",
	"Gothic Italian Triplex": "gothitt.hmp",
	"Greek Complex":          "greekc.hmp",
	"Greek Complex Small":    "greekcs.hmp",
	"Greek Plain":            "greekp.hmp",
	"Greek Simplex":          "greeks.hmp",
	"Cyrillic Complex":       "cyrilc.hmp",
	"Italic Complex":         "italicc.hmp",
	"Italic Complex Small":   "italiccs.hmp",
	"Italic Triplex":         "italict.hmp",
	"Script Complex":         "scriptc.hmp",
	"Script Simplex":         "scripts.hmp",
	"Roman Complex":          "romanc.hmp",
	"Roman Complex Small":    "romancs.hmp",
	"Roman Duplex":           "romand.hmp",
	"Roman Plain":            "romanp.hmp",
	"Roman Simplex":          "romans.hmp",
	"Roman Triplex":          "romant.hmp",
	*/
	"Roman Simplex":          "romans.hmp",
}

func main() {
	fnt := loadFont("data/hershey")
	var x, y int

	for _, v := range selector {
		m := getMap("data/" + v)

		f := fnt.Select(m)
		for i := 32; i < 128; i++ {
			gl := f[rune(i)]
			if y + gl.W >= 4000 {
				y = 0
				x += 200
			}
			fmt.Printf("^%d,%d,%s", x, y, gl)
			y += gl.W
		}
	}
}