11-26-2012 01:53 PM
Agreed.. but sometimes there are specific requirements to use a particular font for various reasons -- consistent branding and look & feel across all supported platforms for example. Also.. maybe you're building an experience that needs to break the mould - maybe something like a game that makes more sense to make in Cascades rather than OpenGL.
11-26-2012 02:01 PM
No - fonts have nothing to do with making the platform look consistent. There is plenty of built in fonts on the device already, but we chose certain fonts in our apps because they add the certain feel to the app.
If anyone is controlling in this respect - it's Apple. Even so - they allow custom fonts (actually - they went a step further and made it very easy).They want you to use certain button types with icons familiar to the user. There is nothing wrong with that, but fonts should be customizable. I am not aware of any other platform that does not support it.
11-26-2012 06:56 PM
11-27-2012 11:01 AM
No, because context varies.
The font you would want for a game for example isalmost certlainly not Slate (too cold and impersonal).
The fonts I need to support some categories of disabled users aren't in the list of supported fonts (e.g. signwriting for deaf users, e.g. specialized fonts to support dyslexic/dyspraxic users). And I wouldn;t expect them to be, but I do need to add them for my own apps.
Software platforms always come to grief when they start making assumptions about the needs of their users; it's why platforms always need to be extensible.
11-28-2012 07:02 AM
FWIW, Qt does not have it's own font rendering engine and uses the underlying platform capabilities for this. When BB10 decides to support this in Cascades they should do it through the standard font handling classes that work on all other Qt supported platforms.
So, two things need to be true:
1) Platform needs to support custom fonts
2) Support for platform font database needs to be wrapped with Qt's font database classes
If you only have fixed text in the custom font you can work around this by pre-rendering it to images. If you need dynamic text you have to wait for the platform to support it.
03-13-2013 10:16 AM
03-13-2013 06:53 PM
It is possible to display custom fonts using a webview. Wrap your label text with the HTML and CSS tags necessary to define font, and point to the local font asset using the url:
Set the source of the webview to your label wrapped in the HTML and CSS tags.
This works, but using webviews hurts performance of the application.