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
Posts: 48
Registered: ‎08-07-2013
My Device: z10

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
Developer
Posts: 540
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....

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
Regular Contributor
Posts: 56
Registered: ‎06-25-2012
My Device: non-blackberry user

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/
Contributor
Posts: 48
Registered: ‎08-07-2013
My Device: z10

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

Regular Contributor
Posts: 56
Registered: ‎06-25-2012
My Device: non-blackberry user

Re: how to get Custom Fonts

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

Developer
Posts: 6,141
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

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.
BlackBerry Development Advisor
Posts: 252
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10

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