aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix90
-rw-r--r--src/scientifica.sfd10
-rw-r--r--src/scientificaBold.sfd4
-rw-r--r--src/scientificaItalic.sfd2
4 files changed, 98 insertions, 8 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..cb2c04c
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,90 @@
1{
2 description = "Scientifica: tall and condensed bitmap font for geeks";
3
4 inputs = {
5
6 nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05";
7
8 bitsnpicas-src = {
9 url = "github:kreativekorp/bitsnpicas";
10 flake = false;
11 };
12
13 };
14
15 outputs =
16 { self
17 , nixpkgs
18 , bitsnpicas-src
19 , ...
20 }:
21 let
22 supportedSystems = [ "x86_64-linux" "x86_64-darwin" ];
23 forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
24
25 nixpkgsFor = forAllSystems (system:
26 import nixpkgs {
27 inherit system;
28 overlays = [ self.overlay ];
29 });
30 in
31 {
32
33 overlay = final: prev: rec {
34
35 bitsnpicas = with final; pkgs.writeScriptBin "bitsnpicas" ''
36 ${jdk}/bin/java -jar ${bitsnpicas-src}/downloads/BitsNPicas.jar
37 '';
38
39 scientifica = with final; pkgs.stdenvNoCC.mkDerivation {
40 pname = "scientifica";
41 version = "v2.3";
42 src = ./.;
43
44 buildPhase = ''
45 runHook preBuild
46
47 fontforge=${pkgs.fontforge}/bin/fontforge
48 bitsnpicas=${self.packages.bitsnpicas}/bin/bitsnpicas
49
50 ff_filter() {
51 fontforge -c 'open(argv[1]).generate(argv[2])' "$@"
52 }
53
54 ttf_filter() {
55 bitsnpicas convertbitmap -f ttf -o "$2" "$1"
56 }
57
58 mkdir -p $out/{ttf,otb,bdf}
59
60 pushd $src
61
62 # generate font files
63 for i in *; do
64 local file_name
65 file_name="''${i%.*}"
66 ttf_filter "$i" "$out/ttf/$file_name.ttf"
67 ff_filter "$i" "$out/otb/$file_name.otb"
68 ff_filter "$i" "$out/bdf/$file_name.bdf"
69 done
70
71 # copy ligature plugins
72 cp -r $src/ligature_plugins $out/ligature_plugins
73
74 popd
75
76 runHook postBuild
77 '';
78
79 };
80
81 };
82
83 packages = forAllSystems (system: {
84 inherit (nixpkgsFor."${system}") scientifica bitsnpicas;
85 });
86
87 defaultPackage = forAllSystems (system: self.packages."${system}".scientifica);
88
89 };
90}
diff --git a/src/scientifica.sfd b/src/scientifica.sfd
index d398caf..f503b2e 100644
--- a/src/scientifica.sfd
+++ b/src/scientifica.sfd
@@ -1835,7 +1835,7 @@ EndChar
1835 1835
1836StartChar: gbreve 1836StartChar: gbreve
1837Encoding: 287 287 222 1837Encoding: 287 287 222
1838Width: 1000 1838Width: 454
1839VWidth: 0 1839VWidth: 0
1840Flags: W 1840Flags: W
1841LayerCount: 2 1841LayerCount: 2
@@ -2339,7 +2339,7 @@ EndChar
2339 2339
2340StartChar: Scedilla 2340StartChar: Scedilla
2341Encoding: 350 350 285 2341Encoding: 350 350 285
2342Width: 1000 2342Width: 454
2343VWidth: 0 2343VWidth: 0
2344Flags: W 2344Flags: W
2345LayerCount: 2 2345LayerCount: 2
@@ -9077,7 +9077,7 @@ BDFChar: 154 219 5 0 3 0 8
9077BDFChar: 155 220 5 0 3 0 8 9077BDFChar: 155 220 5 0 3 0 8
9078O8tB(OH>QcDu]k< 9078O8tB(OH>QcDu]k<
9079BDFChar: 156 221 5 0 3 0 8 9079BDFChar: 156 221 5 0 3 0 8
9080+@)$MODkbm?iU0, 9080+@)$MODkbmDu]k<
9081BDFChar: 157 222 5 0 3 0 6 9081BDFChar: 157 222 5 0 3 0 6
9082JDcNNOPkWh 9082JDcNNOPkWh
9083BDFChar: 158 223 5 0 3 -1 5 9083BDFChar: 158 223 5 0 3 -1 5
@@ -9208,7 +9208,7 @@ BDFChar: 220 285 11 0 3 -2 7
9208+A`&WOH>QC&7>J< 9208+A`&WOH>QC&7>J<
9209BDFChar: 221 286 5 0 3 0 8 9209BDFChar: 221 286 5 0 3 0 8
9210OC2IXJ:Okc?iU0, 9210OC2IXJ:Okc?iU0,
9211BDFChar: 222 287 11 0 3 -2 7 9211BDFChar: 222 287 5 0 3 -2 7
9212OC/'-OH>QC&7>J< 9212OC/'-OH>QC&7>J<
9213BDFChar: 223 288 5 0 3 0 8 9213BDFChar: 223 288 5 0 3 0 8
92145QG2RJ:Okc?iU0, 92145QG2RJ:Okc?iU0,
@@ -9334,7 +9334,7 @@ BDFChar: 283 348 11 0 3 0 8
9334+AcI-J7&qM?iU0, 9334+AcI-J7&qM?iU0,
9335BDFChar: 284 349 11 0 3 0 7 9335BDFChar: 284 349 11 0 3 0 7
9336+A`&WJ7&rH 9336+A`&WJ7&rH
9337BDFChar: 285 350 11 0 3 -2 6 9337BDFChar: 285 350 5 0 3 -2 6
9338@$#nH&<L9B?iU0, 9338@$#nH&<L9B?iU0,
9339BDFChar: 286 351 5 0 3 -2 4 9339BDFChar: 286 351 5 0 3 -2 4
9340E.D=-i#lD- 9340E.D=-i#lD-
diff --git a/src/scientificaBold.sfd b/src/scientificaBold.sfd
index ad9ac61..2f20a5f 100644
--- a/src/scientificaBold.sfd
+++ b/src/scientificaBold.sfd
@@ -51,7 +51,7 @@ NameList: AGL For New Fonts
51DisplaySize: 11 51DisplaySize: 11
52AntiAlias: 1 52AntiAlias: 1
53FitToEm: 0 53FitToEm: 0
54WinInfo: 0 58 15 54WinInfo: 58 58 15
55OnlyBitmaps: 1 55OnlyBitmaps: 1
56BeginPrivate: 0 56BeginPrivate: 0
57EndPrivate 57EndPrivate
@@ -8260,7 +8260,7 @@ BDFChar: 154 219 5 0 3 0 8
8260BDFChar: 155 220 5 0 3 0 8 8260BDFChar: 155 220 5 0 3 0 8
8261O8tB(OH>QcDu]k< 8261O8tB(OH>QcDu]k<
8262BDFChar: 156 221 5 0 3 0 8 8262BDFChar: 156 221 5 0 3 0 8
8263+@)$MODkbm?iU0, 8263+@)$MODkbmDu]k<
8264BDFChar: 157 222 5 0 3 0 6 8264BDFChar: 157 222 5 0 3 0 6
8265JDcNNOPkWh 8265JDcNNOPkWh
8266BDFChar: 158 223 5 0 3 -1 5 8266BDFChar: 158 223 5 0 3 -1 5
diff --git a/src/scientificaItalic.sfd b/src/scientificaItalic.sfd
index b38c330..81ccd2d 100644
--- a/src/scientificaItalic.sfd
+++ b/src/scientificaItalic.sfd
@@ -7942,7 +7942,7 @@ BDFChar: 157 219 5 0 3 0 8
7942BDFChar: 158 220 5 0 3 0 8 7942BDFChar: 158 220 5 0 3 0 8
7943O8tB(OH>QcDu]k< 7943O8tB(OH>QcDu]k<
7944BDFChar: 159 221 5 0 3 0 8 7944BDFChar: 159 221 5 0 3 0 8
7945+@)$MODkbm?iU0, 7945+@)$MODkbmDu]k<
7946BDFChar: 160 222 5 0 3 0 6 7946BDFChar: 160 222 5 0 3 0 6
7947JDcNNOPkWh 7947JDcNNOPkWh
7948BDFChar: 161 223 5 0 3 -1 5 7948BDFChar: 161 223 5 0 3 -1 5