I tried the try-qt-graphics-view svn branch under linux, and the very most of it works great. I have only found something weird in the font_exists function (in graphics/qt.py) . Here, the function wrongly returns "False" even if the font exists. One can try with this modified function which prints the list of the fonts that are found by QT :
def font_exists(cls, fontname):
# Check if the font exists.
f = QFont(fontname)
print fontname, f.exactMatch()
fonts = QFontDatabase()
fam=fonts.families()
familieslist=fam.join(",")
print familieslist
#return f.exactMatch()
return True
I found the bug playing with the graph library, which forces the use of the Arial font, which was not found by the original version of the routine. I can see "Arial" in the QFontDatabase and the f.exactMatch failing, but I have not been able to debug further.
In the hope it helps!
Marco
P.S : By the way, besides this small thing, it works great on linux!
QT (under linux) and fonts
Posted by Marco on Sep 06, 2008Hello,
I tried the try-qt-graphics-view svn branch under linux, and the very most of it works great. I have only found something weird in the font_exists function (in graphics/qt.py) . Here, the function wrongly returns "False" even if the font exists. One can try with this modified function which prints the list of the fonts that are found by QT :
def font_exists(cls, fontname):
# Check if the font exists.
f = QFont(fontname)
print fontname, f.exactMatch()
fonts = QFontDatabase()
fam=fonts.families()
familieslist=fam.join(",")
print familieslist
#return f.exactMatch()
return True
I found the bug playing with the graph library, which forces the use of the Arial font, which was not found by the original version of the routine. I can see "Arial" in the QFontDatabase and the f.exactMatch failing, but I have not been able to debug further.
In the hope it helps!
Marco
P.S : By the way, besides this small thing, it works great on linux!