title: How to use Non-Standard Custom Font with Stylesheets?
body: <p>I have a <code>PyQt4</code> application that is being styled by an external <code>.qss</code> file by using the following code:</p>
  
  <pre><code>...
  app = QtGui.QApplication(sys.argv)
  stylesheet = open('mystylesheet.qss').read()
  app.setStyleSheet(stylesheet)
  ...
  </code></pre>
  
  <p>Normally, I would specify the type of font that I like in the <code>.qss</code> file to use like this:</p>
  
  <pre><code>QMainWindow
  {
  font-family:arial;
  font-size:14px;
  }
  </code></pre>
  
  <p>But, now I am wondering if it is possible for me to assign a custom font that I downloaded from internet (example, <strong>DroidSansMono</strong> (True Type Font) ) instead of windows standard font?</p>
  
  <p><em>NOTE: I am using Windows XP SP3 32 bits, with Python 2.7</em></p>
  
  <h2>UPDATE 1:</h2>
  
  <p>Based on Ekhumoro answer:</p>
  
  <p>I can use the custom font downloaded by adding it to the font database before loading the <code>Stylesheet</code>:</p>
  
  <pre><code>QtGui.QFontDatabase.addApplicationFont("Resources/Mf Wedding Bells.ttf")
  </code></pre>
  
  <p>After that, I can simply use the font name that I have just added in the stylesheet like this:</p>
  
  <pre><code>QLabel
  {
  font-family:Mf Wedding Bells;
  font-size:16px;
  }
  </code></pre>
  
  <p>And it works!!! </p>