Simplify font setup

Now, when I update the unifont files, I only need to change files in the
showbits-assets crate and update the CSS in the UI. I no longer have to
remember to update any symlinks.
This commit is contained in:
Joscha 2025-03-03 19:40:30 +01:00
parent 38994a86ae
commit 14a0596a25
67 changed files with 61 additions and 63 deletions

View file

@ -5,5 +5,5 @@
"[typst]": { "editor.defaultFormatter": "myriad-dreamin.tinymist" },
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.workingDirectories": ["showbits-thermal-printer-ui"],
"tinymist.fontPaths": ["showbits-assets/data"]
"tinymist.fontPaths": ["showbits-assets/fonts"]
}

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 694 B

After

Width:  |  Height:  |  Size: 694 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 901 B

After

Width:  |  Height:  |  Size: 901 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 8 KiB

After

Width:  |  Height:  |  Size: 8 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

View file

@ -1,71 +1,71 @@
pub const UNIFONT: &[u8] = include_bytes!("../data/unifont-15.1.05.otf");
pub const UNIFONT_JP: &[u8] = include_bytes!("../data/unifont_jp-15.1.05.otf");
pub const UNIFONT_UPPER: &[u8] = include_bytes!("../data/unifont_upper-15.1.05.otf");
pub const UNIFONT: &[u8] = include_bytes!("../fonts/unifont-15.1.05.otf");
pub const UNIFONT_JP: &[u8] = include_bytes!("../fonts/unifont_jp-15.1.05.otf");
pub const UNIFONT_UPPER: &[u8] = include_bytes!("../fonts/unifont_upper-15.1.05.otf");
pub const UNIFONT_NAME: &str = "unifont-15.1.05.otf";
pub const UNIFONT_JP_NAME: &str = "unifont_jp-15.1.05.otf";
pub const UNIFONT_UPPER_NAME: &str = "unifont_upper-15.1.05.otf";
pub const EGG_BAD_COVERS: &[&[u8]] = &[include_bytes!("../data/egg_bad/cover_00.png")];
pub const EGG_BAD_COVERS: &[&[u8]] = &[include_bytes!("../eggs/bad/cover_00.png")];
pub const EGG_BAD_PATTERNS: &[&[u8]] = &[
include_bytes!("../data/egg_bad/pattern_00.png"),
include_bytes!("../data/egg_bad/pattern_01.png"),
include_bytes!("../data/egg_bad/pattern_02.png"),
include_bytes!("../data/egg_bad/pattern_03.png"),
include_bytes!("../data/egg_bad/pattern_04.png"),
include_bytes!("../data/egg_bad/pattern_05.png"),
include_bytes!("../data/egg_bad/pattern_06.png"),
include_bytes!("../eggs/bad/pattern_00.png"),
include_bytes!("../eggs/bad/pattern_01.png"),
include_bytes!("../eggs/bad/pattern_02.png"),
include_bytes!("../eggs/bad/pattern_03.png"),
include_bytes!("../eggs/bad/pattern_04.png"),
include_bytes!("../eggs/bad/pattern_05.png"),
include_bytes!("../eggs/bad/pattern_06.png"),
];
pub const EGG_COVERS: &[&[u8]] = &[
include_bytes!("../data/egg/cover_00.png"),
include_bytes!("../data/egg/cover_01.png"),
include_bytes!("../data/egg/cover_02.png"),
include_bytes!("../data/egg/cover_03.png"),
include_bytes!("../data/egg/cover_04.png"),
include_bytes!("../data/egg/cover_05.png"),
include_bytes!("../data/egg/cover_06.png"),
include_bytes!("../eggs/good/cover_00.png"),
include_bytes!("../eggs/good/cover_01.png"),
include_bytes!("../eggs/good/cover_02.png"),
include_bytes!("../eggs/good/cover_03.png"),
include_bytes!("../eggs/good/cover_04.png"),
include_bytes!("../eggs/good/cover_05.png"),
include_bytes!("../eggs/good/cover_06.png"),
];
pub const EGG_PATTERNS: &[&[u8]] = &[
include_bytes!("../data/egg/pattern_00.png"),
include_bytes!("../data/egg/pattern_01.png"),
include_bytes!("../data/egg/pattern_02.png"),
include_bytes!("../data/egg/pattern_03.png"),
include_bytes!("../data/egg/pattern_04.png"),
include_bytes!("../data/egg/pattern_05.png"),
include_bytes!("../data/egg/pattern_06.png"),
include_bytes!("../data/egg/pattern_07.png"),
include_bytes!("../data/egg/pattern_08.png"),
include_bytes!("../data/egg/pattern_09.png"),
include_bytes!("../data/egg/pattern_10.png"),
include_bytes!("../data/egg/pattern_11.png"),
include_bytes!("../data/egg/pattern_12.png"),
include_bytes!("../data/egg/pattern_13.png"),
include_bytes!("../data/egg/pattern_14.png"),
include_bytes!("../data/egg/pattern_15.png"),
include_bytes!("../data/egg/pattern_16.png"),
include_bytes!("../data/egg/pattern_17.png"),
include_bytes!("../data/egg/pattern_18.png"),
include_bytes!("../data/egg/pattern_19.png"),
include_bytes!("../data/egg/pattern_20.png"),
include_bytes!("../data/egg/pattern_21.png"),
include_bytes!("../data/egg/pattern_22.png"),
include_bytes!("../data/egg/pattern_23.png"),
include_bytes!("../data/egg/pattern_24.png"),
include_bytes!("../data/egg/pattern_25.png"),
include_bytes!("../data/egg/pattern_26.png"),
include_bytes!("../data/egg/pattern_27.png"),
include_bytes!("../data/egg/pattern_28.png"),
include_bytes!("../data/egg/pattern_29.png"),
include_bytes!("../data/egg/pattern_30.png"),
include_bytes!("../data/egg/pattern_31.png"),
include_bytes!("../data/egg/pattern_32.png"),
include_bytes!("../data/egg/pattern_33.png"),
include_bytes!("../data/egg/pattern_34.png"),
include_bytes!("../data/egg/pattern_35.png"),
include_bytes!("../data/egg/pattern_36.png"),
include_bytes!("../data/egg/pattern_37.png"),
include_bytes!("../data/egg/pattern_38.png"),
include_bytes!("../data/egg/pattern_39.png"),
include_bytes!("../data/egg/pattern_40.png"),
include_bytes!("../eggs/good/pattern_00.png"),
include_bytes!("../eggs/good/pattern_01.png"),
include_bytes!("../eggs/good/pattern_02.png"),
include_bytes!("../eggs/good/pattern_03.png"),
include_bytes!("../eggs/good/pattern_04.png"),
include_bytes!("../eggs/good/pattern_05.png"),
include_bytes!("../eggs/good/pattern_06.png"),
include_bytes!("../eggs/good/pattern_07.png"),
include_bytes!("../eggs/good/pattern_08.png"),
include_bytes!("../eggs/good/pattern_09.png"),
include_bytes!("../eggs/good/pattern_10.png"),
include_bytes!("../eggs/good/pattern_11.png"),
include_bytes!("../eggs/good/pattern_12.png"),
include_bytes!("../eggs/good/pattern_13.png"),
include_bytes!("../eggs/good/pattern_14.png"),
include_bytes!("../eggs/good/pattern_15.png"),
include_bytes!("../eggs/good/pattern_16.png"),
include_bytes!("../eggs/good/pattern_17.png"),
include_bytes!("../eggs/good/pattern_18.png"),
include_bytes!("../eggs/good/pattern_19.png"),
include_bytes!("../eggs/good/pattern_20.png"),
include_bytes!("../eggs/good/pattern_21.png"),
include_bytes!("../eggs/good/pattern_22.png"),
include_bytes!("../eggs/good/pattern_23.png"),
include_bytes!("../eggs/good/pattern_24.png"),
include_bytes!("../eggs/good/pattern_25.png"),
include_bytes!("../eggs/good/pattern_26.png"),
include_bytes!("../eggs/good/pattern_27.png"),
include_bytes!("../eggs/good/pattern_28.png"),
include_bytes!("../eggs/good/pattern_29.png"),
include_bytes!("../eggs/good/pattern_30.png"),
include_bytes!("../eggs/good/pattern_31.png"),
include_bytes!("../eggs/good/pattern_32.png"),
include_bytes!("../eggs/good/pattern_33.png"),
include_bytes!("../eggs/good/pattern_34.png"),
include_bytes!("../eggs/good/pattern_35.png"),
include_bytes!("../eggs/good/pattern_36.png"),
include_bytes!("../eggs/good/pattern_37.png"),
include_bytes!("../eggs/good/pattern_38.png"),
include_bytes!("../eggs/good/pattern_39.png"),
include_bytes!("../eggs/good/pattern_40.png"),
];

View file

@ -0,0 +1 @@
../../showbits-assets/fonts

View file

@ -1 +0,0 @@
../../../showbits-assets/data/unifont-15.1.05.otf

View file

@ -1 +0,0 @@
../../../showbits-assets/data/unifont_jp-15.1.05.otf

View file

@ -1 +0,0 @@
../../../showbits-assets/data/unifont_upper-15.1.05.otf