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
Developer
bskania
Posts: 105
Registered: ‎04-24-2012
My Carrier: relience

How can I set different kind of fonts to text in cascades

Hello,

 

I want to use different font on each text in my app,

I want to use Helvetica font.

I found that in each text style only sans serif and serif fonts are supported.

So how can I apply helvetica font in my application.

 

Thanks in advance

bskania.

Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Carrier: N/A

Re: How can I set different kind of fonts to text in cascades

Have you looked at the QML properties pane in Momentics?

 

Once you create a TextField in your QML document and place your cursor in it, the QML Properties pane will change accordingly. Here is an example of a customized TextField:

 

        TextField {
            textStyle.fontStyle: FontStyle.Italic
            textStyle.fontWeight: FontWeight.Normal
            text: "TESTING"
            textStyle.fontStyleHint: FontStyleHint.Serif
            textStyle.fontFamily: "Helvetica"
        }

 

Cheers,

 

Martin

 

Please use plain text.
Developer
bskania
Posts: 105
Registered: ‎04-24-2012
My Carrier: relience

Re: How can I set different kind of fonts to text in cascades

yes I had looked at the QML properties pane in Momentics.

In that 3 fonts are there.

"default"

"Sans serif"

and "serif"

 

bskania

Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Carrier: N/A

Re: How can I set different kind of fonts to text in cascades

These three options reflect the FontStyleHint; The actual font is selected using the "textStyle.fontFamily" property.

Have you tried setting this to a specific font e.g.: textStyle.fontFamily: "Helvetica"

 

Are you able to see changes to the font with this line?

 

Please use plain text.
Developer
bcs925
Posts: 258
Registered: ‎07-13-2012
My Carrier: T-Mobile

Re: How can I set different kind of fonts to text in cascades

I am having the same issue as the original poster... no matter what I change the textStyle.fontFamily: "" or the textStyle{ fontFamily: ""} to it doesn't change the font.  Also on that note changing from "serif" to "sansserif" that doesn't change as it should either.

---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Carrier: N/A

Re: How can I set different kind of fonts to text in cascades

At this point, I would encourage to post an issue in the Issue Tracking system as fonts should be working with these properties.

 

Issue tracker:

https://www.blackberry.com/jira/secure/Dashboard.jspa

 

Please post the Issue's link here afterwards, I will change visibility to public so others can vote on it.

 

Thanks!

 

Maritn

 

Please use plain text.
Developer
bcs925
Posts: 258
Registered: ‎07-13-2012
My Carrier: T-Mobile

Re: How can I set different kind of fonts to text in cascades

I will make one, but is this really necessary... As in if this isn't a popular issue we just won't get fonts?
---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Please use plain text.
Developer
bcs925
Posts: 258
Registered: ‎07-13-2012
My Carrier: T-Mobile

Re: How can I set different kind of fonts to text in cascades

JIRA ticket created: BBTEN-235

---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Please use plain text.
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Carrier: N/A

Re: How can I set different kind of fonts to text in cascades

Great, thank you!

 

Martin

Please use plain text.
Contributor
battlegoat
Posts: 16
Registered: ‎01-04-2013
My Carrier: Rogers Unfortunately

Re: How can I set different kind of fonts to text in cascades

It would appear that there is still no ability to set FontFamily in Cascades in the current version?  The bug report is still open, and I can't find any information on a work-around.

 

It would be nice to have a monospaced font choice for the app we're doing, but currently this does not appear to be possible.  The inability to use other fonts in Cascades is a bit odd.

 

Please use plain text.