summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-10-31 12:23:26 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-10-31 12:23:26 +0200
commit98f5ab5aa00f4d6b83079e6ee4e228b401356198 (patch)
tree3760877ce19431b821b66ae8b43a9fecea201460 /res
parenta7596f683456da5274ecb33d4043a9eb47858c99 (diff)
Changed format of resources.lgr
Resources are now stored in a ZIP archive, and it comes with an explicit version number. All the old embed/bincat stuff was removed as unnecessary. resources.lgr is also a valid fontpack, for loading the built-in fonts. IssueID #363
Diffstat (limited to 'res')
-rw-r--r--res/Fontpack.cmake19
-rw-r--r--res/bincat.c48
-rwxr-xr-xres/bincat.sh22
-rw-r--r--res/fontpack.ini (renamed from res/default.fontpack/fontpack.ini)22
-rw-r--r--res/fonts/IosevkaTerm-Extended.ttf (renamed from res/default.fontpack/IosevkaTerm-Extended.ttf)bin1503504 -> 1503504 bytes
-rw-r--r--res/fonts/LICENSE_OFL.txt (renamed from res/default.fontpack/LICENSE_OFL.txt)0
-rw-r--r--res/fonts/LICENSE_SmolEmoji.txt (renamed from res/default.fontpack/LICENSE_SmolEmoji.txt)0
-rw-r--r--res/fonts/NotoEmoji-Regular.ttf (renamed from res/default.fontpack/NotoEmoji-Regular.ttf)bin418804 -> 418804 bytes
-rw-r--r--res/fonts/NotoSansSymbols-Regular.ttf (renamed from res/default.fontpack/NotoSansSymbols-Regular.ttf)bin168520 -> 168520 bytes
-rw-r--r--res/fonts/NotoSansSymbols2-Regular.ttf (renamed from res/default.fontpack/NotoSansSymbols2-Regular.ttf)bin583072 -> 583072 bytes
-rw-r--r--res/fonts/SmolEmoji-Regular.ttf (renamed from res/default.fontpack/SmolEmoji-Regular.ttf)bin58544 -> 58544 bytes
-rw-r--r--res/fonts/SourceSans3-Bold.ttf (renamed from res/default.fontpack/SourceSans3-Bold.ttf)bin298256 -> 298256 bytes
-rw-r--r--res/fonts/SourceSans3-ExtraLight.ttf (renamed from res/default.fontpack/SourceSans3-ExtraLight.ttf)bin293932 -> 293932 bytes
-rw-r--r--res/fonts/SourceSans3-It.ttf (renamed from res/default.fontpack/SourceSans3-It.ttf)bin214992 -> 214992 bytes
-rw-r--r--res/fonts/SourceSans3-Regular.ttf (renamed from res/default.fontpack/SourceSans3-Regular.ttf)bin299252 -> 299252 bytes
-rw-r--r--res/fonts/SourceSans3-Semibold.ttf (renamed from res/default.fontpack/SourceSans3-Semibold.ttf)bin298888 -> 298888 bytes
16 files changed, 11 insertions, 100 deletions
diff --git a/res/Fontpack.cmake b/res/Fontpack.cmake
deleted file mode 100644
index 26d6df1e..00000000
--- a/res/Fontpack.cmake
+++ /dev/null
@@ -1,19 +0,0 @@
1find_program (ZIP_EXECUTABLE zip DOC "ZIP archiver")
2if (NOT ZIP_EXECUTABLE)
3 message (FATAL_ERROR "Please install 'zip' to create fontpacks.")
4endif ()
5
6function (make_fontpack src)
7 get_filename_component (dst ${src} NAME)
8 set (fn ${CMAKE_BINARY_DIR}/${dst})
9 execute_process (COMMAND ${CMAKE_COMMAND} -E remove ${fn})
10 file (GLOB files RELATIVE ${CMAKE_SOURCE_DIR}/${src}
11 ${CMAKE_SOURCE_DIR}/${src}/*
12 )
13 message (STATUS " ${src}")
14 execute_process (
15 COMMAND ${ZIP_EXECUTABLE} -0 ${fn} ${files}
16 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${src}
17 OUTPUT_QUIET
18 )
19endfunction ()
diff --git a/res/bincat.c b/res/bincat.c
deleted file mode 100644
index 8fc9d831..00000000
--- a/res/bincat.c
+++ /dev/null
@@ -1,48 +0,0 @@
1/* Copyright 2020 Jaakko Keränen <jaakko.keranen@iki.fi>
2
3Redistribution and use in source and binary forms, with or without
4modification, are permitted provided that the following conditions are met:
5
61. Redistributions of source code must retain the above copyright notice, this
7 list of conditions and the following disclaimer.
82. Redistributions in binary form must reproduce the above copyright notice,
9 this list of conditions and the following disclaimer in the documentation
10 and/or other materials provided with the distribution.
11
12THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
13ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
16ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
17(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
18LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
20(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
22
23/* bincat.c: Tiny tool for concatenating binary files */
24
25#include <stdio.h>
26#include <stdlib.h>
27
28int main(int argc, char *argv[]) {
29 const size_t bufSize = 1024 * 256;
30 char *buf = malloc(bufSize);
31 FILE *out = fopen(argv[1], "wb");
32 int i;
33 for (i = 2; i < argc; ++i) {
34 FILE *f = fopen(argv[i], "rb");
35 size_t fileSize = 0;
36 for (;;) {
37 size_t num = fread(buf, 1, bufSize, f);
38 if (num <= 0) break;
39 fileSize += num;
40 fwrite(buf, 1, num, out);
41 }
42 fclose(f);
43 printf("%zu;", fileSize);
44 }
45 fclose(out);
46 free(buf);
47 return 0;
48}
diff --git a/res/bincat.sh b/res/bincat.sh
deleted file mode 100755
index eb46655b..00000000
--- a/res/bincat.sh
+++ /dev/null
@@ -1,22 +0,0 @@
1#!/bin/bash
2# Binary Resource Concatenator
3# Copyright: 2021 Jaakko Keränen <jaakko.keranen@iki.fi>
4# License: BSD 2-Clause
5
6OUTPUT=--
7SIZES=""
8for fn in $*; do
9 if [ "$OUTPUT" = "--" ]; then
10 OUTPUT=$fn
11 rm -f ${OUTPUT}
12 else
13 vals=(`/bin/ls -l $fn`)
14 if [ "$SIZES" = "" ]; then
15 SIZES=${vals[4]}
16 else
17 SIZES=$SIZES\;${vals[4]}
18 fi
19 cat ${fn} >> ${OUTPUT}
20 fi
21done
22echo $SIZES
diff --git a/res/default.fontpack/fontpack.ini b/res/fontpack.ini
index 68316ef6..920a4ad2 100644
--- a/res/default.fontpack/fontpack.ini
+++ b/res/fontpack.ini
@@ -19,17 +19,17 @@
19 19
20[default] 20[default]
21name = "Source Sans" 21name = "Source Sans"
22regular = "SourceSans3-Regular.ttf" 22regular = "fonts/SourceSans3-Regular.ttf"
23italic = "SourceSans3-It.ttf" 23italic = "fonts/SourceSans3-It.ttf"
24light = "SourceSans3-ExtraLight.ttf" 24light = "fonts/SourceSans3-ExtraLight.ttf"
25semibold = "SourceSans3-Semibold.ttf" 25semibold = "fonts/SourceSans3-Semibold.ttf"
26bold = "SourceSans3-Bold.ttf" 26bold = "fonts/SourceSans3-Bold.ttf"
27 27
28[iosevka] 28[iosevka]
29name = "Iosevka (compact)" 29name = "Iosevka (compact)"
30monospace = true 30monospace = true
31doc.height = 0.800 31doc.height = 0.800
32regular = "IosevkaTerm-Extended.ttf" 32regular = "fonts/IosevkaTerm-Extended.ttf"
33 33
34[iosevka-body] 34[iosevka-body]
35# Variant of Iosevka with expanded line spacing for better readability. 35# Variant of Iosevka with expanded line spacing for better readability.
@@ -38,21 +38,21 @@ name = "Iosevka"
38monospace = true 38monospace = true
39priority = -10 39priority = -10
40glyphscale = 0.800 40glyphscale = 0.800
41regular = "IosevkaTerm-Extended.ttf" 41regular = "fonts/IosevkaTerm-Extended.ttf"
42 42
43[smolemoji] 43[smolemoji]
44name = "Smol Emoji" 44name = "Smol Emoji"
45override = true # These Emoji/symbols are always preferred. 45override = true # These Emoji/symbols are always preferred.
46auxiliary = true 46auxiliary = true
47priority = 100 47priority = 100
48regular = "SmolEmoji-Regular.ttf" 48regular = "fonts/SmolEmoji-Regular.ttf"
49 49
50[notoemoji] 50[notoemoji]
51name = "Noto Emoji" 51name = "Noto Emoji"
52auxiliary = true 52auxiliary = true
53priority = 30 53priority = 30
54glyphscale = 1.1 54glyphscale = 1.1
55regular = "NotoEmoji-Regular.ttf" 55regular = "fonts/NotoEmoji-Regular.ttf"
56 56
57[notosymbols2] 57[notosymbols2]
58name = "Noto Sans Symbols 2" 58name = "Noto Sans Symbols 2"
@@ -60,7 +60,7 @@ auxiliary = true
60priority = 20 60priority = 20
61glyphscale = 1.45 61glyphscale = 1.45
62voffset = 0.5 62voffset = 0.5
63regular = "NotoSansSymbols2-Regular.ttf" 63regular = "fonts/NotoSansSymbols2-Regular.ttf"
64 64
65[notosymbols] 65[notosymbols]
66name = "Noto Sans Symbols" 66name = "Noto Sans Symbols"
@@ -68,4 +68,4 @@ auxiliary = true
68priority = 10 68priority = 10
69glyphscale = 2.0 69glyphscale = 2.0
70voffset = 1.2 70voffset = 1.2
71regular = "NotoSansSymbols-Regular.ttf" 71regular = "fonts/NotoSansSymbols-Regular.ttf"
diff --git a/res/default.fontpack/IosevkaTerm-Extended.ttf b/res/fonts/IosevkaTerm-Extended.ttf
index 16989a85..16989a85 100644
--- a/res/default.fontpack/IosevkaTerm-Extended.ttf
+++ b/res/fonts/IosevkaTerm-Extended.ttf
Binary files differ
diff --git a/res/default.fontpack/LICENSE_OFL.txt b/res/fonts/LICENSE_OFL.txt
index d952d62c..d952d62c 100644
--- a/res/default.fontpack/LICENSE_OFL.txt
+++ b/res/fonts/LICENSE_OFL.txt
diff --git a/res/default.fontpack/LICENSE_SmolEmoji.txt b/res/fonts/LICENSE_SmolEmoji.txt
index 3513b65a..3513b65a 100644
--- a/res/default.fontpack/LICENSE_SmolEmoji.txt
+++ b/res/fonts/LICENSE_SmolEmoji.txt
diff --git a/res/default.fontpack/NotoEmoji-Regular.ttf b/res/fonts/NotoEmoji-Regular.ttf
index 19b7badf..19b7badf 100644
--- a/res/default.fontpack/NotoEmoji-Regular.ttf
+++ b/res/fonts/NotoEmoji-Regular.ttf
Binary files differ
diff --git a/res/default.fontpack/NotoSansSymbols-Regular.ttf b/res/fonts/NotoSansSymbols-Regular.ttf
index 68847551..68847551 100644
--- a/res/default.fontpack/NotoSansSymbols-Regular.ttf
+++ b/res/fonts/NotoSansSymbols-Regular.ttf
Binary files differ
diff --git a/res/default.fontpack/NotoSansSymbols2-Regular.ttf b/res/fonts/NotoSansSymbols2-Regular.ttf
index 79706435..79706435 100644
--- a/res/default.fontpack/NotoSansSymbols2-Regular.ttf
+++ b/res/fonts/NotoSansSymbols2-Regular.ttf
Binary files differ
diff --git a/res/default.fontpack/SmolEmoji-Regular.ttf b/res/fonts/SmolEmoji-Regular.ttf
index 3ab9484b..3ab9484b 100644
--- a/res/default.fontpack/SmolEmoji-Regular.ttf
+++ b/res/fonts/SmolEmoji-Regular.ttf
Binary files differ
diff --git a/res/default.fontpack/SourceSans3-Bold.ttf b/res/fonts/SourceSans3-Bold.ttf
index 486ede63..486ede63 100644
--- a/res/default.fontpack/SourceSans3-Bold.ttf
+++ b/res/fonts/SourceSans3-Bold.ttf
Binary files differ
diff --git a/res/default.fontpack/SourceSans3-ExtraLight.ttf b/res/fonts/SourceSans3-ExtraLight.ttf
index 53e1541c..53e1541c 100644
--- a/res/default.fontpack/SourceSans3-ExtraLight.ttf
+++ b/res/fonts/SourceSans3-ExtraLight.ttf
Binary files differ
diff --git a/res/default.fontpack/SourceSans3-It.ttf b/res/fonts/SourceSans3-It.ttf
index 9823601c..9823601c 100644
--- a/res/default.fontpack/SourceSans3-It.ttf
+++ b/res/fonts/SourceSans3-It.ttf
Binary files differ
diff --git a/res/default.fontpack/SourceSans3-Regular.ttf b/res/fonts/SourceSans3-Regular.ttf
index f6d31e8c..f6d31e8c 100644
--- a/res/default.fontpack/SourceSans3-Regular.ttf
+++ b/res/fonts/SourceSans3-Regular.ttf
Binary files differ
diff --git a/res/default.fontpack/SourceSans3-Semibold.ttf b/res/fonts/SourceSans3-Semibold.ttf
index d4774aab..d4774aab 100644
--- a/res/default.fontpack/SourceSans3-Semibold.ttf
+++ b/res/fonts/SourceSans3-Semibold.ttf
Binary files differ