Kurt Jungs Auslieferungszustand

This commit is contained in:
2021-03-02 13:27:45 +01:00
commit 5afea81825
156 changed files with 30287 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
TRG= ../files.go
JSON= ../../../font/calligra.json
Z= ../../../font/calligra.z
${TRG} : ${JSON} ${Z} ./bin
echo "package files" > ${TRG}
echo "" >> ${TRG}
echo "// CalligraJson is embedded byte slice for calligra.json" >> ${TRG}
echo "var CalligraJson = []byte{" >> ${TRG}
./bin < ${JSON} >> ${TRG}
echo "}" >> ${TRG}
echo "" >> ${TRG}
echo "// CalligraZ is embedded byte slice for calligra.z" >> ${TRG}
echo "var CalligraZ = []byte{" >> ${TRG}
./bin < ${Z} >> ${TRG}
echo "}" >> ${TRG}
gofmt -s -w ${TRG}
./bin : bin.go
go build -v
clean :
rm -f ./bin ${TRG}

28
internal/files/bin/bin.go Normal file
View File

@@ -0,0 +1,28 @@
package main
import (
"fmt"
"io/ioutil"
"os"
)
func main() {
var buf []byte
var pos int
var b byte
var err error
buf, err = ioutil.ReadAll(os.Stdin)
if err == nil {
for _, b = range buf {
fmt.Printf("0x%02X, ", b)
pos++
if pos >= 16 {
fmt.Println("")
pos = 0
}
}
}
if err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err)
}
}