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
Super Contributor
JeffLemon
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Custom Fonts

Is it possible to use my own font with a label? I read that it was not possible before, but the posts are quite old, can it be done now?

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.
Visitor
Dievon
Posts: 1
Registered: ‎04-20-2011
My Device: Torch 9810, PlayBook
My Carrier: Movistar

Re: Custom Fonts

Hi Jeff. Did you finally get to change label font family at all? I dont' get it even with Arial or any other standard apart from default
Please use plain text.
Super Contributor
JeffLemon
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Custom Fonts

Nope, still waiting for a reply from someone who might know how to do it.

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Custom Fonts

You are talking about Momentics, right? With Qt it is possible.

Please use plain text.
Developer
BBornot2B
Posts: 19
Registered: ‎11-11-2012
My Device: Z10, DevAlphaC, Torch 9810, PlayBook
My Carrier: Movistar

Re: Custom Fonts

Right, we know how to do it, but the font won't show changed on dev alpha or bb10 simulator... nor in the qml view of the momentics IDE
Please use plain text.
Super Contributor
JeffLemon
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Custom Fonts

Could you post your code? Thanks!
--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.
Developer
BBornot2B
Posts: 19
Registered: ‎11-11-2012
My Device: Z10, DevAlphaC, Torch 9810, PlayBook
My Carrier: Movistar

Re: Custom Fonts

Sure!

// Default empty project template
import bb.cascades 1.0
import bbornot2b.lib 1.0

// creates one page with a label
Page {
Container {
layout: DockLayout {
}
ImageView {
imageSource: "asset:///images/background_portrait.png"
}
ImageView {
imageSource: "asset:///images/message-box.png"
}
Label {
id: message
objectName: "app_message"
text: "Slide to unlock"
textStyle.fontFamily: "Arial"
textStyle.textAlign: TextAlign.Center
textStyle.color: Color.White
translationY: 60
preferredWidth: 768.0
preferredHeight: 230.0
textStyle.fontSizeValue: 15.0
}
...
Please use plain text.
Super Contributor
JeffLemon
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Custom Fonts

Does anyone know how to load in custom fonts yet?

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.
Developer
BBornot2B
Posts: 19
Registered: ‎11-11-2012
My Device: Z10, DevAlphaC, Torch 9810, PlayBook
My Carrier: Movistar

Re: Custom Fonts

Not yet... any comment about the code I posted? Thanks, Diego
Please use plain text.
Super Contributor
JeffLemon
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Custom Fonts

[ Edited ]

Yoru code doesnt mention anything about loading in a customer font, it just says arial

 

Thanks anyway

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.