<div dir="ltr">Hi Matthias,<br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 10, 2014 at 10:29 AM, Matthias Kuhn <span dir="ltr"><<a href="mailto:matthias.kuhn@gmx.ch" target="_blank">matthias.kuhn@gmx.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I was looking at some of the tests, and realized, that the composerhtml test fails because of some slight font differences.<br>
<br>
Firebug tells me that the following fonts are used (defined by bootstrap.css):<br>
<br>
"Helvetica Neue",Helvetica,Arial,sans-<u></u>serif<br>
<br>
I don't have any of these Helvetica fonts installed and I am not sure about their licensing, but it seems that no package includes them just like that. Does anybody know a font which is just available out of the box on all plattforms to get around such issues? Arial maybe?<br>

<br>
This option seems much better to me than fixing things with a tolerance param.<br></blockquote><div><br></div>About a year ago, I added a custom built, very lightweight font, FreeSansQGIS, just for tests [0], based off of FreeSans. Usage info is explained in its README [1], notably that the font not be installed on the system. It is intended to be loaded on-the-fly via Qt's font-handling routines, and is already available in the utilities.py module via loadTestFont() [2]. <br>
<br>I have also added it to the startup functionality of the QGIS app and server [3], which loads the font if the testdata directory is available, e.g. when running ctest from build directory. Feel free to fix anything wrong with my implementation.<br>
<br></div><div class="gmail_quote">Regardless, I have still seen differences in how the same font is drawn by the different systems' window server, so some amount of tolerance (or a set of anomalies) is probably always going to be needed. Though, hopefully that's not a moving target because of the standardized test font.<br>
</div><div class="gmail_quote"><div><br></div><div>Recently I came across another test font used by the MapServer project, which we might also consider using because it also has bold face [4]. Not sure how it compares to the 'normal' Vera font. However, I think if it is used it should still be renamed to FreeSansQGIS to avoid conflict with installed fonts, and make it easily searchable in the QFontDatabase.<br>
<br>[0] <a href="https://github.com/qgis/QGIS/tree/master/tests/testdata/font">https://github.com/qgis/QGIS/tree/master/tests/testdata/font</a><br>[1] <a href="https://github.com/qgis/QGIS/blob/master/tests/testdata/font/FreeSansQGIS-README.txt">https://github.com/qgis/QGIS/blob/master/tests/testdata/font/FreeSansQGIS-README.txt</a><br>
[2] <a href="https://github.com/qgis/QGIS/blob/master/tests/src/python/utilities.py#L218-L228">https://github.com/qgis/QGIS/blob/master/tests/src/python/utilities.py#L218-L228</a><br>[3] <a href="https://github.com/qgis/QGIS/blob/master/src/app/main.cpp#L739-L746">https://github.com/qgis/QGIS/blob/master/src/app/main.cpp#L739-L746</a><br>
     <a href="https://github.com/qgis/QGIS/blob/master/src/mapserver/qgis_map_serv.cpp#L244-L253">https://github.com/qgis/QGIS/blob/master/src/mapserver/qgis_map_serv.cpp#L244-L253</a><br>[4] <a href="https://github.com/mapserver/mapserver/tree/master/tests/vera">https://github.com/mapserver/mapserver/tree/master/tests/vera</a><br>
</div><div><br></div><div>Regards,<br><br></div><div>Larry<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Have a nice weekend,<br>
Matthias<br>
______________________________<u></u>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/qgis-<u></u>developer</a><br>
</blockquote></div><br></div></div></div></div>