View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0017607 | Scribus | General | public | 2025-08-25 21:48 | 2025-09-03 15:01 |
| Reporter | tifain | Assigned To | jghali | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 1.6.4 | ||||
| Summary | 0017607: Script python problem with scribus.setFont ? | ||||
| Description | SCript python problem with scribus.setFont ? | ||||
| Steps To Reproduce | # Vérifiez que Scribus est en mode script if not scribus.haveDoc(): scribus.messageBox("Erreur", "Aucun document ouvert.") else: # Définir les paramètres de la table rows = 4 cols = 25 start_value = 1 end_value = 100 value = start_value # Créer une nouvelle page scribus.newPage(-1) # Définir la largeur et la hauteur des cellules cell_width = 10 # largeur de chaque cellule cell_height = 5 # hauteur de chaque cellule # Boucle pour créer les cellules for row in range(rows): for col in range(cols): if value <= end_value: # Calculer la position de la cellule x = col * cell_width y = row * cell_height # Créer un cadre de texte pour chaque valeur text_frame = scribus.createText(x, y, cell_width, cell_height) scribus.setText(str(value), text_frame) # Appliquer le style de texte scribus.setFont("Times-Roman", text_frame) scribus.setFontSize(9, text_frame) # Taille de la police en pouces scribus.setLeading(12, text_frame) # Interlignage en pouces # Incrémenter la valeur value += 1 scribus.messageBox("Succès", "Table de valeurs créée avec succès.") | ||||
| Tags | #tobeclosed | ||||
| Patch | No | ||||
|
|
I guess that Times-Roman is not a "font". I've tried to replace it with "DejaVu Sans Book" that exist on my system and, then it goes through that line. Just make sure that you type a valid Family and Style. And setLeading() does not exist. Finally, there are so many odd things in your script that I wonder if you're a bot or if you just used some AI to generate the script, without really understanding what it does. |
|
|
Hihi l'invention d'un `setLeading` est typique des hallucinations d'une IA qui prend ses désirs d'API pour une réalité |
|
|
Closing as the setFont() call is clearly incorrect due to missing font style. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-08-25 21:48 | tifain | New Issue | |
| 2025-08-26 07:55 | ale | Note Added: 0052960 | |
| 2025-08-26 07:56 | ale | Note Edited: 0052960 | |
| 2025-08-26 12:42 | ale | Tag Attached: #tobeclosed | |
| 2025-08-28 08:22 | JLuc | Note Added: 0052976 | |
| 2025-08-28 08:25 | JLuc | Note Edited: 0052976 | |
| 2025-08-29 18:29 | JLuc | Summary | SCrip python problem with scribus.setFont ? => Script python problem with scribus.setFont ? |
| 2025-08-29 18:29 | JLuc | Description Updated | |
| 2025-09-03 15:01 | jghali | Assigned To | => jghali |
| 2025-09-03 15:01 | jghali | Status | new => resolved |
| 2025-09-03 15:01 | jghali | Resolution | open => no change required |
| 2025-09-03 15:01 | jghali | Note Added: 0053001 | |
| 2025-09-03 15:01 | jghali | Status | resolved => closed |