Quellcode durchsuchen

Make output font-show. Must set Unicode=True.

Need Unicode=True before Output() calls.
Steve Thielemann vor 3 Jahren
Ursprung
Commit
e06474d7ef
2 geänderte Dateien mit 5 neuen und 3 gelöschten Zeilen
  1. 4 2
      font-show/font-show.go
  2. 1 1
      font-show/go.mod

+ 4 - 2
font-show/font-show.go

@@ -273,12 +273,13 @@ func ExtractBlock(name string, offsets []uint16, data []byte) (Font door.BlockFo
 	return font
 }
 
-func Show(parts [][]byte) {
+func Show(parts []string) {
 	reset := "\x1b[0m"
 
 	if len(parts) > 0 {
 		for _, line := range parts {
-			fmt.Printf("%s%s\n", door.CP437_to_Unicode(string(line)), reset)
+			// fmt.Printf("%s%s\n", door.CP437_to_Unicode(string(line)), reset)
+			fmt.Printf("%s%s\n", line, reset)
 		}
 		fmt.Println("")
 	}
@@ -519,6 +520,7 @@ func main() {
 	var fonts string
 	var listFonts bool
 	var allFonts bool
+	door.Unicode = true
 
 	flag.StringVar(&fonts, "f", "", "Font(s) to show")
 	flag.BoolVar(&allFonts, "a", false, "Show All Fonts")

+ 1 - 1
font-show/go.mod

@@ -1,4 +1,4 @@
-module red-green/show-font
+module red-green/font-show
 
 go 1.17