aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-14 21:44:29 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-14 21:44:29 +0200
commit054700bf7efb8a346f13e59b10afca3cade3dc52 (patch)
tree588998706c0467bca81b294769e4e76fa06e08b3
parent8d2c66c04c5707ed0c75371946c758ddf4fd47db (diff)
Sort fonts
-rw-r--r--main.go55
1 files changed, 25 insertions, 30 deletions
diff --git a/main.go b/main.go
index 7e65b9d..149537e 100644
--- a/main.go
+++ b/main.go
@@ -3,46 +3,41 @@ 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 Duplex": "romand.hmp",
+ "Roman Complex": "romanc.hmp",
+ "Roman Complex Small": "romancs.hmp",
"Roman Triplex": "romant.hmp",
- */
- "Roman Simplex": "romans.hmp",
+ "Script Simplex": "scripts.hmp",
+ "Script Complex": "scriptc.hmp",
+ "Italic Complex": "italicc.hmp",
+ "Italic Complex Small": "italiccs.hmp",
+ "Italic Triplex": "italict.hmp",
+ "Greek Plain": "greekp.hmp",
+ "Greek Simplex": "greeks.hmp",
+ "Greek Complex": "greekc.hmp",
+ "Greek Complex Small": "greekcs.hmp",
+ "Cyrillic Complex": "cyrilc.hmp",
+ "Gothic English Triplex": "gothgbt.hmp",
+ "Gothic German Triplex": "gothgrt.hmp",
+ "Gothic Italian Triplex": "gothitt.hmp",
}
func main() {
fnt := loadFont("data/hershey")
var x, y int
- for _, v := range selector {
- m := getMap("data/" + v)
+ m := getMap("data/" + selector["Roman Simplex"])
- 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
+ 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
}
}