summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2016-07-30 17:01:07 -0400
committerKurt <kurt.w.jung@gmail.com>2016-07-30 17:01:07 -0400
commitadcaebf957268ca694a22b1d8002e901ce915549 (patch)
treec8168ca551b7f07b9c2958baaccd9983896fe81b /internal
parent915906ba1ac3db38aee1818e4579589169a5bd68 (diff)
Makefile for generating embedded calligra font file
Diffstat (limited to 'internal')
-rw-r--r--internal/files/bin/Makefile22
-rw-r--r--internal/files/files.go6
2 files changed, 24 insertions, 4 deletions
diff --git a/internal/files/bin/Makefile b/internal/files/bin/Makefile
new file mode 100644
index 0000000..64b9a77
--- /dev/null
+++ b/internal/files/bin/Makefile
@@ -0,0 +1,22 @@
+TRG= ../files.go
+JSON= ../../../font/calligra.json
+Z= ../../../font/calligra.z
+
+${TRG} : ${JSON} ${Z} ./bin
+ echo "package files" > ${TRG}
+ echo "" >> ${TRG}
+ echo "var CalligraJson = []byte{" >> ${TRG}
+ ./bin < ${JSON} >> ${TRG}
+ echo "}" >> ${TRG}
+ echo "" >> ${TRG}
+ echo "var CalligraZ = []byte{" >> ${TRG}
+ ./bin < ${Z} >> ${TRG}
+ echo "}" >> ${TRG}
+ gofmt -w ${TRG}
+
+./bin : bin.go
+ go build -v
+
+clean :
+ rm -f ./bin ${TRG}
+
diff --git a/internal/files/files.go b/internal/files/files.go
index eea6f0d..eda2fb7 100644
--- a/internal/files/files.go
+++ b/internal/files/files.go
@@ -83,8 +83,7 @@ var CalligraJson = []byte{
0x65, 0x32, 0x22, 0x3A, 0x30, 0x2C, 0x22, 0x4F, 0x72, 0x69, 0x67, 0x69, 0x6E, 0x61, 0x6C, 0x53,
0x69, 0x7A, 0x65, 0x22, 0x3A, 0x34, 0x30, 0x31, 0x32, 0x30, 0x2C, 0x22, 0x49, 0x22, 0x3A, 0x30,
0x2C, 0x22, 0x4E, 0x22, 0x3A, 0x30, 0x2C, 0x22, 0x44, 0x69, 0x66, 0x66, 0x4E, 0x22, 0x3A, 0x30,
- 0x7D,
-}
+ 0x7D}
var CalligraZ = []byte{
0x78, 0x9C, 0xA4, 0xFC, 0x07, 0x80, 0x5C, 0x57, 0x7D, 0x2F, 0x8E, 0x9F, 0x73, 0x6E, 0xEF, 0xFD,
@@ -1687,5 +1686,4 @@ var CalligraZ = []byte{
0x54, 0x75, 0x39, 0x2C, 0xCD, 0x40, 0xC8, 0x95, 0x6F, 0xE8, 0x78, 0x59, 0x09, 0x07, 0x5D, 0xCD,
0x38, 0x25, 0x10, 0x2C, 0xA1, 0xC7, 0xE3, 0x61, 0x36, 0x91, 0xC7, 0x9E, 0xF0, 0xE2, 0x25, 0xD8,
0xE3, 0xB8, 0xC1, 0x8F, 0xB0, 0x27, 0x24, 0x76, 0x71, 0xC9, 0xEE, 0x82, 0xBE, 0x3F, 0xEC, 0xFF,
- 0x27, 0x00, 0x00, 0xFF, 0xFF, 0xA4, 0xB4, 0xB8, 0xA4,
-}
+ 0x27, 0x00, 0x00, 0xFF, 0xFF, 0xA4, 0xB4, 0xB8, 0xA4}