diff options
author | Akshay <[email protected]> | 2021-10-01 17:15:56 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-10-01 17:15:56 +0100 |
commit | 3bad67b25652306f49b77deb3f176eff73876632 (patch) | |
tree | bf0ffbe8f322ee55d2a57dfbb36ff9bf4185ca58 | |
parent | fd8484a615a5480a918443ae323203c73f273065 (diff) |
close #55, #51
-rw-r--r-- | flake.nix | 90 | ||||
-rw-r--r-- | src/scientifica.sfd | 10 | ||||
-rw-r--r-- | src/scientificaBold.sfd | 4 | ||||
-rw-r--r-- | src/scientificaItalic.sfd | 2 |
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 | ||
1836 | StartChar: gbreve | 1836 | StartChar: gbreve |
1837 | Encoding: 287 287 222 | 1837 | Encoding: 287 287 222 |
1838 | Width: 1000 | 1838 | Width: 454 |
1839 | VWidth: 0 | 1839 | VWidth: 0 |
1840 | Flags: W | 1840 | Flags: W |
1841 | LayerCount: 2 | 1841 | LayerCount: 2 |
@@ -2339,7 +2339,7 @@ EndChar | |||
2339 | 2339 | ||
2340 | StartChar: Scedilla | 2340 | StartChar: Scedilla |
2341 | Encoding: 350 350 285 | 2341 | Encoding: 350 350 285 |
2342 | Width: 1000 | 2342 | Width: 454 |
2343 | VWidth: 0 | 2343 | VWidth: 0 |
2344 | Flags: W | 2344 | Flags: W |
2345 | LayerCount: 2 | 2345 | LayerCount: 2 |
@@ -9077,7 +9077,7 @@ BDFChar: 154 219 5 0 3 0 8 | |||
9077 | BDFChar: 155 220 5 0 3 0 8 | 9077 | BDFChar: 155 220 5 0 3 0 8 |
9078 | O8tB(OH>QcDu]k< | 9078 | O8tB(OH>QcDu]k< |
9079 | BDFChar: 156 221 5 0 3 0 8 | 9079 | BDFChar: 156 221 5 0 3 0 8 |
9080 | +@)$MODkbm?iU0, | 9080 | +@)$MODkbmDu]k< |
9081 | BDFChar: 157 222 5 0 3 0 6 | 9081 | BDFChar: 157 222 5 0 3 0 6 |
9082 | JDcNNOPkWh | 9082 | JDcNNOPkWh |
9083 | BDFChar: 158 223 5 0 3 -1 5 | 9083 | BDFChar: 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< |
9209 | BDFChar: 221 286 5 0 3 0 8 | 9209 | BDFChar: 221 286 5 0 3 0 8 |
9210 | OC2IXJ:Okc?iU0, | 9210 | OC2IXJ:Okc?iU0, |
9211 | BDFChar: 222 287 11 0 3 -2 7 | 9211 | BDFChar: 222 287 5 0 3 -2 7 |
9212 | OC/'-OH>QC&7>J< | 9212 | OC/'-OH>QC&7>J< |
9213 | BDFChar: 223 288 5 0 3 0 8 | 9213 | BDFChar: 223 288 5 0 3 0 8 |
9214 | 5QG2RJ:Okc?iU0, | 9214 | 5QG2RJ:Okc?iU0, |
@@ -9334,7 +9334,7 @@ BDFChar: 283 348 11 0 3 0 8 | |||
9334 | +AcI-J7&qM?iU0, | 9334 | +AcI-J7&qM?iU0, |
9335 | BDFChar: 284 349 11 0 3 0 7 | 9335 | BDFChar: 284 349 11 0 3 0 7 |
9336 | +A`&WJ7&rH | 9336 | +A`&WJ7&rH |
9337 | BDFChar: 285 350 11 0 3 -2 6 | 9337 | BDFChar: 285 350 5 0 3 -2 6 |
9338 | @$#nH&<L9B?iU0, | 9338 | @$#nH&<L9B?iU0, |
9339 | BDFChar: 286 351 5 0 3 -2 4 | 9339 | BDFChar: 286 351 5 0 3 -2 4 |
9340 | E.D=-i#lD- | 9340 | E.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 | |||
51 | DisplaySize: 11 | 51 | DisplaySize: 11 |
52 | AntiAlias: 1 | 52 | AntiAlias: 1 |
53 | FitToEm: 0 | 53 | FitToEm: 0 |
54 | WinInfo: 0 58 15 | 54 | WinInfo: 58 58 15 |
55 | OnlyBitmaps: 1 | 55 | OnlyBitmaps: 1 |
56 | BeginPrivate: 0 | 56 | BeginPrivate: 0 |
57 | EndPrivate | 57 | EndPrivate |
@@ -8260,7 +8260,7 @@ BDFChar: 154 219 5 0 3 0 8 | |||
8260 | BDFChar: 155 220 5 0 3 0 8 | 8260 | BDFChar: 155 220 5 0 3 0 8 |
8261 | O8tB(OH>QcDu]k< | 8261 | O8tB(OH>QcDu]k< |
8262 | BDFChar: 156 221 5 0 3 0 8 | 8262 | BDFChar: 156 221 5 0 3 0 8 |
8263 | +@)$MODkbm?iU0, | 8263 | +@)$MODkbmDu]k< |
8264 | BDFChar: 157 222 5 0 3 0 6 | 8264 | BDFChar: 157 222 5 0 3 0 6 |
8265 | JDcNNOPkWh | 8265 | JDcNNOPkWh |
8266 | BDFChar: 158 223 5 0 3 -1 5 | 8266 | BDFChar: 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 | |||
7942 | BDFChar: 158 220 5 0 3 0 8 | 7942 | BDFChar: 158 220 5 0 3 0 8 |
7943 | O8tB(OH>QcDu]k< | 7943 | O8tB(OH>QcDu]k< |
7944 | BDFChar: 159 221 5 0 3 0 8 | 7944 | BDFChar: 159 221 5 0 3 0 8 |
7945 | +@)$MODkbm?iU0, | 7945 | +@)$MODkbmDu]k< |
7946 | BDFChar: 160 222 5 0 3 0 6 | 7946 | BDFChar: 160 222 5 0 3 0 6 |
7947 | JDcNNOPkWh | 7947 | JDcNNOPkWh |
7948 | BDFChar: 161 223 5 0 3 -1 5 | 7948 | BDFChar: 161 223 5 0 3 -1 5 |