<p><span style="font-size: 10pt; font-family: Arial;">Hi Phil,</span></p>

<p><span style="font-size: 10pt; font-family: Arial;"> </span></p>

<p><span style="font-size: 10pt; font-family: Arial;">I wonder if
you can shed any light on this problem – or suggest diagnostic steps.</span></p>

<p><span style="font-size: 10pt; font-family: Arial;"> </span></p>

<p><span style="font-size: 10pt; font-family: Arial;">The program
below successfully renders the bass cleff musical symbol on a Windows/PyQt
installation:</span></p>

<p><span style="font-size: 10pt; font-family: Arial;"> </span></p>

<p><span style="font-size: 10pt; font-family: Arial;">from
PyQt4.QtGui import *</span></p>

<p><span style="font-size: 10pt; font-family: Arial;">from
PyQt4.QtCore import *</span></p>

<p><span style="font-size: 10pt; font-family: Arial;">local_app =
QApplication([])</span></p>

<p><span style="font-size: 10pt; font-family: Arial;" lang="DE">buf = u&quot;&lt;font style=&#39;font-family: Euterpe;
font-size: 40px;&#39;&gt;\U0001D122&lt;/font&gt;&quot;</span></p>

<p><span style="font-size: 10pt; font-family: Arial;">lbl =
QLabel()</span></p>

<p><span style="font-size: 10pt; font-family: Arial;">lbl.setText(buf)</span></p>

<p><span style="font-size: 10pt; font-family: Arial;">lbl.show()</span></p>

<p><span style="font-size: 10pt; font-family: Arial;">local_app.exec_()</span></p>

<p><span style="font-size: 10pt; font-family: Arial;"> </span></p>

<p><span style="font-size: 10pt; font-family: Arial;">The same
program on a Linux installation runs without complaint, but shows a
different character in place of the expected bass cleff symbol (I don&#39;t
know what it is).</span></p><p><br><span style="font-size: 10pt; font-family: Arial;"></span></p>
<p><span style="font-size: 10pt; font-family: Arial;">Of course this is dependent on the cited font being available. In both cases I have intalled the Euterpre truetype font: <a href="http://openfontlibrary.org/media/files/Eimai/191" target="_blank">http://openfontlibrary.org/media/files/Eimai/191</a></span></p>

<p><br><span style="font-size: 10pt; font-family: Arial;"></span></p><p><span style="font-size: 10pt; font-family: Arial;">I
have attempted to prove the successful installation of this font on the
Linux machine using the Gnome Character Map application. This
sucessfully shows a bunch of musical symbols in the preview pane when
the Euterpre font is selected, and with the music symbols unicode block
selected. If I uninstall/reinstall the font, this application&#39;s ability
to preview the musical symbols disappears / reappears accordingly. So
it seems the font is viable and available.</span></p>
<p><br><span style="font-size: 10pt; font-family: Arial;"></span></p><p><span style="font-size: 10pt; font-family: Arial;">You
will see that the unicode code point in question is &gt; 0xFFFF, ie
beyond the basic multilingual plane, and thus requires surrogate-pair
representation in Python. (std build)<br>
</span></p><p><br><span style="font-size: 10pt; font-family: Arial;"></span></p><p><span style="font-size: 10pt; font-family: Arial;">I have tried to reproduce the problem in straight C++ Qt (to rule out PyQt) , but have fallen near the finishing post.</span></p>

<p><br><span style="font-size: 10pt; font-family: Arial;"></span></p><p><span style="font-size: 10pt; font-family: Arial;">The
program below is I believe equivalent to the Python - and this builds
and runs as expected. However my hurdle is that I am not confident
about how to insert the unicode string literal into the C++, and thus
cannot quite finish the job.</span></p>
<p><span style="font-size: 10pt; font-family: Arial;"><br></span></p>#include &lt;QApplication&gt;<br>#include &lt;QLabel&gt;<br><br>int main(int argc, char *argv[])<br>    {<br>    QApplication app(argc, argv);<br>
    QString s(&quot;&lt;font style=&#39;font-family: Euterpe; font-size: 40px;&#39;&gt;plain text&lt;/font&gt;&quot;);<br>    QLabel label(s);<br>    label.show();<br>    return app.exec();<br>    }<p><span style="font-size: 10pt; font-family: Arial;"><br>

</span></p><p>The Linux machine environment is: Ubuntu 9.04. Qt 4.5.0, Python 2.6, PyQt 4.5.4</p><p><br></p><p>Any advice gratefully received.<br><span style="font-size: 10pt; font-family: Arial;"></span></p>
<p><span style="font-size: 10pt; font-family: Arial;"><br></span></p><p><span style="font-size: 10pt; font-family: Arial;"> </span></p>

<a name="122eaed998cbfa21__MailAutoSig"><span style="font-size: 10pt; font-family: Arial; color: rgb(31, 73, 125);">Peter Howard</span></a>