From 3c6dc5f289bd87010fdc529162af8c17ce407ddc Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 13 May 2015 18:22:50 +0200 Subject: Initial import --- main.go | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 main.go (limited to 'main.go') diff --git a/main.go b/main.go new file mode 100644 index 0000000..dee6bd2 --- /dev/null +++ b/main.go @@ -0,0 +1,40 @@ +package main + +import "fmt" + +var fontfile = "hershey.txt" + +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", +} + +func main() { + fnt := loadFont(fontfile) + + for k, v := range selector { + fmt.Println(k) + m := getMap(v) + + for k, gl := range fnt.Select(m) { + fmt.Println(k, gl) + } + } +} -- cgit v1.2.3