diff --git a/font_pixellizer/README.md b/font_pixellizer/README.md index fae3959..29a8b81 100644 --- a/font_pixellizer/README.md +++ b/font_pixellizer/README.md @@ -50,7 +50,7 @@ pip install fontforge svgpathtools lxml --break-system-packages python3 font_pixelizer.py votre_fonte.ttf ``` -#### Paramètres modifiables dans le script : +### Paramètres modifiables dans le script : ```python # Taille des pixels @@ -75,6 +75,14 @@ font_weight = "Regular" export_formats = ["ttf"] # ["ttf", "otf", "woff", "woff2"] ``` +### Ajouter de l’aléatoire +Pour ajouter de l’aléatoire dans les paramètres: +- voir exemple de configuration ligne 117 (commentée par défaut) +- voir exemple de configuration ligne 235 (commentée par défaut) + +=> randrange(min, max, step) + + ## Exemples de configuration ### Fonte rétro 8-bit classique @@ -117,7 +125,7 @@ pixel_gap = 10 monospace = True ``` -## 🎨 Styles de pixels disponibles +## Styles de pixels disponibles ### Square (carré) ```python diff --git a/font_pixellizer/font_pixelizer.py b/font_pixellizer/font_pixelizer.py index a1a93f2..92c5fab 100644 --- a/font_pixellizer/font_pixelizer.py +++ b/font_pixellizer/font_pixelizer.py @@ -174,7 +174,7 @@ def pixelize_glyph(svg_path): scaled_width = width * width_scale # Décommenter ici pour avoir des tailles de pixels aléatoires - pixel_size = randrange(30, 60, 1) + #pixel_size = randrange(30, 60, 1) # Calculer la grille de pixels cols = max(1, int(scaled_width / pixel_size))