Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -83,14 +83,16 @@ def build_ufo_from_glyphs(glyphs):
|
|
| 83 |
glyph = Glyph()
|
| 84 |
glyph.name = letter
|
| 85 |
glyph.unicode = ord(letter)
|
| 86 |
-
pen =
|
| 87 |
try:
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
pen.
|
| 92 |
-
|
| 93 |
-
|
|
|
|
|
|
|
| 94 |
except Exception as e:
|
| 95 |
print(f"Error injecting SVG for {letter}: {e}")
|
| 96 |
font.insertGlyph(glyph)
|
|
|
|
| 83 |
glyph = Glyph()
|
| 84 |
glyph.name = letter
|
| 85 |
glyph.unicode = ord(letter)
|
| 86 |
+
pen = glyph.getPen()
|
| 87 |
try:
|
| 88 |
+
# Dessiner un rectangle pour chaque glyphe
|
| 89 |
+
pen.moveTo((50, 0))
|
| 90 |
+
pen.lineTo((500, 0))
|
| 91 |
+
pen.lineTo((500, 500))
|
| 92 |
+
pen.lineTo((50, 500))
|
| 93 |
+
pen.closePath()
|
| 94 |
+
glyph.width = 600
|
| 95 |
+
print(f"Glyph {letter} created with rectangle contour.")
|
| 96 |
except Exception as e:
|
| 97 |
print(f"Error injecting SVG for {letter}: {e}")
|
| 98 |
font.insertGlyph(glyph)
|