Note that there are some explanatory texts on larger screens.

plurals
  1. POSetting a custom font on a Label Blackberry 10
    primarykey
    data
    text
    <p>Right now i have tried the documentation, the tutorials, but looks like there's no implementation for this, even i have been trying to use the QFontDataBase to add it to the App, but it just crashes trying to instantiate it.</p> <p>I had luck with the Webviews, but it is not what i need on my app.</p> <p>The last thing i have made is trying to write the html content inside the Label, but yet not luck:</p> <pre><code>Label *label = new Label(); label-&gt;setText("&lt;html&gt; &lt;head&gt; &lt;style&gt;@font-face { font-family: 'AmaticSCRegular'; src: url('local:///assets/fonts/amaticsc-regular.eot'); src: url('local:///assets/fonts/amaticsc-regular.eot') format('embedded-opentype'), url('local:///assets/fonts/amaticsc-regular.woff') format('woff'), url('local:///assets/fonts/amaticsc-regular.ttf') format('truetype'), url('local:///assets/fonts/amaticsc-regular.svg#AmaticSCRegular') format('svg'); font-weight: normal; font-style: normal; } body {font-family: 'AmaticSCRegular'; font-size: 3em; color:#777777; text-align: center;}&lt;/style&gt;&lt;/head&gt;&lt;body&gt;Center + Crop&lt;/body&gt;&lt;/html&gt;"); </code></pre> <p>The whole thing works, except the font-family.</p> <p>The fonts files, are in the assets/fonts folder of the project.</p> <p>The QML code is the same as the TextStyle of the Blackberry 10 Cascade Documentation. (<a href="http://developer.blackberry.com/native/documentation/cascades/ui/text/styles.html" rel="nofollow">http://developer.blackberry.com/native/documentation/cascades/ui/text/styles.html</a>)</p> <p>Any idea?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload