<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/116065/">https://git.reviewboard.kde.org/r/116065/</a>
     </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for QML Web and Anton Kreuzkamp.</div>
<div>By Nikita Skovoroda.</div>


<p style="color: grey;"><i>Updated Feb. 25, 2014, 11:20 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
qmlweb
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description  (updated)</h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Implement FontLoader type.

See http://qt-project.org/doc/qt-5/qml-qtquick-fontloader.html and http://qt-project.org/doc/qt-4.7/qml-fontloader.html

This currently depends on smnh's MIT-licensed FontLoader.js library
to get notifications when a font is loaded and trigger all events in time.

Elements that are using that font through 'font.family: fontId.name' get their dimensions recalculated correctly when the font loads.

If FontLoader.js is not provided the font is still loaded, but 'status' property is set to Error and dimensions recalculation is triggered after a fixed timeout (3 seconds).
In this case the user gets a notice in console.log.


Timeout (3 seconds) is the maximum time for a font to load. If font isn't loaded in this time, status is set to Error.
Without FontLoader.js dimensions recalculations for elements are triggered after that time.

For both cases (with and without FontLoader.js) if the font takes more than this time to load, dimensions recalculations for elements that are using this font will not be triggered or will have no effect.

On the other hand, if the font could not be loaded (with FontLoader.js enabled), the Error status will be set only when this timeout expires.
</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Works as expected (as described above) with or without FontLoader.js.
Tested cases when the font should load and when it should fail to load.

Tested «Text {font.family: fontId.name}» dimensions recalculations.

Works well for me.
</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/qtcore.js <span style="color: grey">(c219e2e)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/116065/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>