update readme
This commit is contained in:
parent
67eb7fa315
commit
a25f7b6eba
2 changed files with 11 additions and 3 deletions
|
|
@ -50,7 +50,7 @@ pip install fontforge svgpathtools lxml --break-system-packages
|
||||||
python3 font_pixelizer.py votre_fonte.ttf
|
python3 font_pixelizer.py votre_fonte.ttf
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Paramètres modifiables dans le script :
|
### Paramètres modifiables dans le script :
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# Taille des pixels
|
# Taille des pixels
|
||||||
|
|
@ -75,6 +75,14 @@ font_weight = "Regular"
|
||||||
export_formats = ["ttf"] # ["ttf", "otf", "woff", "woff2"]
|
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
|
## Exemples de configuration
|
||||||
|
|
||||||
### Fonte rétro 8-bit classique
|
### Fonte rétro 8-bit classique
|
||||||
|
|
@ -117,7 +125,7 @@ pixel_gap = 10
|
||||||
monospace = True
|
monospace = True
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🎨 Styles de pixels disponibles
|
## Styles de pixels disponibles
|
||||||
|
|
||||||
### Square (carré)
|
### Square (carré)
|
||||||
```python
|
```python
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ def pixelize_glyph(svg_path):
|
||||||
scaled_width = width * width_scale
|
scaled_width = width * width_scale
|
||||||
|
|
||||||
# Décommenter ici pour avoir des tailles de pixels aléatoires
|
# 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
|
# Calculer la grille de pixels
|
||||||
cols = max(1, int(scaled_width / pixel_size))
|
cols = max(1, int(scaled_width / pixel_size))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue