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

Web and WebWorks Development

Reply
Developer
Posts: 166
Registered: ‎03-04-2011
My Device: Playbook

Adding a custom font to WebWorks PlayBook app

I'm developing a WebWorks Playbook app.

 

I want to use my own font on app.

 

How can I add it and use it?

Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Adding a custom font to WebWorks PlayBook app

You could try this:

http://typekit.com/tour/library

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Developer
Posts: 669
Registered: ‎02-19-2011
My Device: BlackBerry PlayBook 32GB
My Carrier: Sprint

Re: Adding a custom font to WebWorks PlayBook app

My open source Unit Converter app uses custom fonts.

 

Have a look at the code here:

 

https://github.com/TheMarco/Unit-Converter

Staff UI Prototyper (read: full-time hacker)


My BB10 apps: Screamager | Scientific RPN Calculator | The Last Weather App

Developer
Posts: 125
Registered: ‎11-05-2011
My Device: Z10, Bold 9900
My Carrier: Smartone

Re: Adding a custom font to WebWorks PlayBook app

Can I ask if it's possible to add a custom font without embedding it in the package? e.g. can I add a custom font by loading the ttf file externally from a shared folder?

 

Thank you.

Developer
Posts: 34
Registered: ‎05-20-2012
My Device: Playbook
My Carrier: Vodafone

Re: Adding a custom font to WebWorks PlayBook app

You can use google web fonts for this.

http://www.google.com/webfonts

Very simple to use, choose the font and sting in css file like:

<link href='http://fonts.googleapis.com/css?family=Dynalight' rel='stylesheet' type='text/css'>
Regular Contributor
Posts: 81
Registered: ‎03-09-2012
My Device: PlayBook & Bold 9780
My Carrier: n/a

Re: Adding a custom font to WebWorks PlayBook app

[ Edited ]

Wouldn't using a full URI for the link to the font be problematic if there is no internet connection? If the app is designed to also run without an internet connection, then I'd prefer packaging it in the .bar. It gets a bit larger (but so does also having a splash screen) and managing shared fonts for just a couple of apps would be a nightmare.

Contributor
Posts: 41
Registered: ‎04-27-2010
My Device: Z10
My Carrier: VIettel

Re: Adding a custom font to WebWorks PlayBook app

Yes you can define your custom font with the link to the font files stored in shared folder such as Documents. The URI should be: "file:///accounts/1000/shared/documents"
---
More applications/games here: http://appworld.blackberry.com/webstore/vendor/14299/
louis.keeper@gmail.com
haitt@viethop.net
http://blackberryvietnam.net
http://viethop.com
Highlighted
Developer
Posts: 125
Registered: ‎11-05-2011
My Device: Z10, Bold 9900
My Carrier: Smartone

Re: Adding a custom font to WebWorks PlayBook app

Thanks. I tested it and that works like a charm.