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

Native Development

Reply
Contributor
tnavabothu
Posts: 48
Registered: ‎08-07-2013
My Device: z10
My Carrier: blackberry

how to get Custom Fonts

Hi, Is there any way to implement custom fonts.right now i have some .ttf files in assets folder.now i need to implement these fonts in my app.how can i do this? thanks in advance
Please use plain text.
Developer
Benecore
Posts: 377
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: T-Mobile

Re: how to get Custom Fonts

[ Edited ]

Look here

https://developer.blackberry.com/native/reference/cascades/bb__cascades__fontfacerule.html

 

Hope it helps



If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog
Please use plain text.
Regular Contributor
coolneo
Posts: 56
Registered: ‎06-25-2012
My Device: non-blackberry user
My Carrier: Airtel

Re: how to get Custom Fonts

Hi ,

From 10.2 onwards you can use custom fonts in your application check this blog:

http://devblog.blackberry.com/2013/08/cascades-ui-framework-improvements-in-10-2/
Please use plain text.
Contributor
tnavabothu
Posts: 48
Registered: ‎08-07-2013
My Device: z10
My Carrier: blackberry

Re: how to get Custom Fonts

thanks for the reply...:Shifty: but i'm developing the app in 10.0 version.i had seen the link,but it works for 10.2 version.i need to know is there any way in 10.0 version

Please use plain text.
Regular Contributor
coolneo
Posts: 56
Registered: ‎06-25-2012
My Device: non-blackberry user
My Carrier: Airtel

Re: how to get Custom Fonts

I think there is no way to do that :smileysad:

Please use plain text.
Developer
BBSJdev
Posts: 5,948
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: how to get Custom Fonts

The only way to get custom fonts before 10.2 would be by using a WebView (i.e. CSS) but if I remember rightly it was hit and miss...

 

WebView {

    html: "<html><head><title>Font with styles</title><style>* { margin: 0px; padding 0px; }body { font-size: 48px; font-family: monospace; border: 1px solid #444; padding: 4px; }</style> </head> <body></body></html>"

}

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10
My Carrier: Bell

Re: how to get Custom Fonts

[ Edited ]

Hi tnavabothu,

 

Text font customization is not possible on 10.0 and 10.1. Text font customization was only introduced in the 10.2 SDK. Checkout my recent blog post here: http://devblog.blackberry.com/2013/10/add-more-typographic-visual-style-to-your-app-with-the-10-2-re...

 

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.