06-22-2012 05:15 AM
Hi guys !
I have to get a list of fonts installed in the Alpha Device, needed for a text setting pickup dialog.
The cascades documentation says nothing about this. How can i get it?
Thanks.
Solved! Go to Solution.
06-22-2012 09:03 AM
This doesn't directly answer your question, but see:
Stuart
06-22-2012 03:03 PM - edited 06-22-2012 03:07 PM
Thanks smacmartin for your reply, but how you know, I was thinking on cascades's native fonts, not Qt fonts.
However, while cascades fonts are "accesible" to us at next releases ( i hope, i hope), Qt fonts maybe are valid for my purpose.
Best regards.
06-22-2012 03:06 PM
06-22-2012 03:20 PM
It is not documented in https://developer.blackberry.com/cascades/referenc
Try it and let me know. (It's on my queue but I can't get to it today). It might be that you can collect info with QFont and from that initialize the appropriate font, but I'd have to play to be sure this works.
Stuart
06-22-2012 05:10 PM
Ok. I will try it.
Thanks again.![]()
06-26-2012 07:03 AM
That doesn't work. QFont is no supported in Cascades. I tested.
The other alternative is using fontFamily property and create a "hand-made" list of font families, but fontFamily has no effect too !! :
--------------
Label {
text: "Hello world"
textStyle {
fontFamily: "Times New Roman"
}
}
--------------
It doesn't work. All other properties work (size, fontStyle, fontWeight, etc.), except fontFamily.
A bug ? A known issue ? (i don't see in release notes)
Any ideas ?
Thanks.
09-24-2012 09:37 AM
QFontDatabase database;
QStringList fontList = database.families();
foreach (const QString &family, database.families())
{
qDebug() << family;
}