Skip to content

Commit e496b99

Browse files
committed
fnt pic copy procedure
1 parent d433045 commit e496b99

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

tools/font/bdfconv/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ falconded9: bdfconv
193193
convert bdf.tga -trim u8g2_font_falconded_mr.png
194194
./bdfconv -v -f 1 -b 1 -a -m '32-99' falconded.bdf -o u8g2_font_falconded_hr.c -n u8g2_font_falconded_hr -d ../bdf/helvR12.bdf
195195
convert bdf.tga -trim u8g2_font_falconded_hr.png
196+
./bdfconv -v -f 1 -b 2 -a -m '32-65535' falconded.bdf -o u8g2_font_falconded_all.c -n u8g2_font_falconded_all -d ../bdf/helvR12.bdf
197+
convert bdf.tga -trim u8g2_font_falconded_all.png
196198

197199

198200
analecta: bdfconv

tools/font/build/copy_fnt_pic.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
SOURCE_DIR=~/git/u8g2.wiki/fntpic
4+
DEST_DIR=~/git/u8g2/tools/font/build
5+
6+
# Create destination directory if it doesn't exist
7+
# mkdir -p "$DEST_DIR"
8+
9+
# Loop through all .png files in the source directory
10+
find $SOURCE_DIR -type f -name "*te*.png" | while read -r src_file; do
11+
# Get the relative path of the file from source directory
12+
rel_path="${src_file#$SOURCE_DIR/}"
13+
dest_file="$DEST_DIR/$rel_path"
14+
15+
# If file doesn't exist in destination, or size has changed, copy it
16+
if [ ! -f "$dest_file" ] || [ "$(stat -c %s "$src_file")" -ne "$(stat -c %s "$dest_file" 2>/dev/null)" ]; then
17+
# mkdir -p "$(dirname "$dest_file")" # Ensure destination subdirectory exists
18+
ls -al "$src_file" "$dest_file"
19+
cp "$src_file" "$dest_file"
20+
echo "Copied: $rel_path"
21+
fi
22+
done

0 commit comments

Comments
 (0)