Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Harry_Dodgson
Posts: 151
Registered: ‎10-26-2010
My Device: Bold 9900
My Carrier: AT&T

List of available fonts

 

Per webcast #2, this is the place to request a list of fonts that will be available to use on the PlayBook.  I'll be happy if there is at least one non-proportional one, like Courier.  Something big and thick for titles would be good too.

--------------
Accepted PlayBook Applications: Marmi-doos, BASIC, Run and Hide
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: List of available fonts

Also, would be good to know their path and if it is possible to embed them at runtime so we dont have to embed them during compilation to help keep the application file size down.

Please use plain text.
Regular Contributor
renaun
Posts: 86
Registered: ‎10-25-2010
My Device: Not Specified

Re: List of available fonts

The default device font used by QNX UI components is "BBAlpha Sans". You can find out all the device fonts by listing out Font.enumerateFonts(true). Of course this is whats on the simulator and it might be different on the final device. Here is more information on figuring out font names:

http://renaun.com/blog/2010/12/what-font-does-qnx-ui-components-on-the-playbook-use/

blog: http://renaun.com
twitter: @renaun
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: List of available fonts

However, you can not set the font globally with the SDK like you can with Flex style sheets. 

Please use plain text.
Regular Contributor
renaun
Posts: 86
Registered: ‎10-25-2010
My Device: Not Specified

Re: List of available fonts

Nope thats just the nature of AS3 TextFields and TextFormats. And the reason for libraries like QNX and Flex that provide conviences like global font style changing. You can get the QNX TextFormat instance of a specific omponent globally with ThemeGlobals.getTextFormat(name, theme):TextFormat.

blog: http://renaun.com
twitter: @renaun
Please use plain text.
Developer
gluth
Posts: 192
Registered: ‎09-23-2009
My Device: 9860/PlayBook/Dev Alpha
My Carrier: Plus GSM

Re: List of available fonts

We may embed any font inside of application using Embed property for fields. We don't have to be so system font dependend.

Found my post helpfull? Like it! It solves your trouble? Help others and accept it as solution. Search before asking.
My apps: Secret Cod3s | Should my tablet be banned?
--
Jakub Nietrzeba
PGS Software S.A.
Your reliable partner in Poland - IT Outsourcing - BlackBerry, iPhone, Web and Standalone applications
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: List of available fonts

Understood.  I was just hoping to load the BB font on the AIR side, so it will look like what the simulator will show and then comment it out before deploying to the simulator.  Text placement is slightly dependent of the font face.  But if I cannot do that in 1-2 lines of code, I will not try it.

Please use plain text.
Regular Contributor
renaun
Posts: 86
Registered: ‎10-25-2010
My Device: Not Specified

Re: List of available fonts

true, If you are using the QNX components and can get BBAlpha Sans installed on your machine then you would be able to see the app on your desktop just like it would be on the simulator.

blog: http://renaun.com
twitter: @renaun
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: List of available fonts

Hi renaun:  Installed where (under Windows)? 

Please use plain text.
Regular Contributor
renaun
Posts: 86
Registered: ‎10-25-2010
My Device: Not Specified

Re: List of available fonts

You would go find BBAlphaSans.ttf and in install it like you normal do for any font on whichever OS you are using. I don't konw much about this font but it seems like it gets installed with some of BlackBerry's other tools.

blog: http://renaun.com
twitter: @renaun
Please use plain text.