This commit is contained in:
2024-12-19 12:38:42 +01:00
parent 4bbeedbb77
commit 933fa18cc6
6 changed files with 25 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 60 KiB

25
xxd_convert.sh Normal file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
# Vérifie si un argument de dossier est fourni
if [ $# -ne 1 ]; then
echo "Usage: $0 <dossier>"
exit 1
fi
# Vérifie si le dossier existe
DIR=$1
if [ ! -d "$DIR" ]; then
echo "Erreur : Le dossier '$DIR' n'existe pas."
exit 1
fi
# Parcourt tous les fichiers .png du dossier et sous-dossiers
find "$DIR" -type f -name "*.ttf" | while read -r file; do
# Récupère le nom du fichier sans extension
base_name=$(basename "$file" .ttf)
# Définit le nom de sortie avec extension .h
output_file="${file%/*}/${base_name}.h"
# Exécute la commande xxd -i
xxd -i "$file" > "$output_file"
echo "Converti : $file -> $output_file"
done