1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

QT (under linux) and fonts

Posted by Marco on Sep 06, 2008

Hello,

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!