Bonjour,

J'ai un programme sur lequel les fonts n'apparaissent plus en souligner depuis que j'ai changé de version d'OS

Quand je lance cet exemple, si l'italic fonctionne le soulignée et le understrike ne fonctionnent pas.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
from Tkinter import *
import tkFont
 
root = Tk()
 
my_font = tkFont.Font( root, family="Lohit Kannada",size=10, underline = 1 )
print my_font.actual()
my_font.config( underline = 1 )
print my_font.actual()
 
can = Canvas( root, height = 400, width = 200 )
can.create_text( 100, 50, font = ("Lohit Kannada", 10, 'italic' ), text = "developpez.com" )
can.create_text( 100, 100, font = ("Lohit Kannada", 10, 'underline' ), text = "developpez.com" )
can.create_text( 100, 150, font = my_font, text = "developpez.com" )
 
can.pack()
root.mainloop()
les deux premiers print de ce programme m'affiche :

{'family': 'Lohit Kannada', 'weight': 'normal', 'slant': 'roman', 'overstrike': 0, 'underline': 0, 'size': 10}
{'family': 'Lohit Kannada', 'weight': 'normal', 'slant': 'roman', 'overstrike': 0, 'underline': 0, 'size': 10}
pourquoi underline est toujours à 0 !?

un help( tkFont )

[...]
DATA
BOLD = 'bold'
ITALIC = 'italic'
NORMAL = 'normal'
ROMAN = 'roman'
__version__ = '0.9'

VERSION
0.9
[...]
Ne devrais-je pas avoir également dans ce paragraphe les données UNDERLINE et OVERSTRIKE ?

Si quelqu'un à une solution, une réponse ou une suggestion je suis preneur.

Merci d'avance.