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

Java Development

Reply
Trusted Contributor
jppedroso
Posts: 119
Registered: ‎04-29-2010
My Device: Curve 8520
Accepted Solution

Font.SERIF_STYLE what's the use?

Hi,

 

Can anyone explain me what's the use of Font.SERIF_STYLE? Which situations is used?

 

Best regards

................................................................................................
Tech On!
PTNews
more at On On On!
Contributor
azoc
Posts: 35
Registered: ‎09-15-2011
My Device: Torch 9800, Tour 9630

Re: Font.SERIF_STYLE what's the use?

If the font you're setting the style on has a serif variation, it will use that. Often, different style variations are embedded right into the typeface, but not always.

On-screen serif fonts should probably be reserved for long blocks of larger point size text -- like an e-book or news reader app. At small sizes the serifs actually impair readability.
Trusted Contributor
jppedroso
Posts: 119
Registered: ‎04-29-2010
My Device: Curve 8520

Re: Font.SERIF_STYLE what's the use?

thks azoc!

 

I pretend to use serif style on a news reader :smileyhappy:

 

how can I know which Fonts have serif variation on BB devices?

 

what do you mean by "are embedded right into the typeface, but not always." ?

 

best regards!

................................................................................................
Tech On!
PTNews
more at On On On!
Trusted Contributor
jppedroso
Posts: 119
Registered: ‎04-29-2010
My Device: Curve 8520

Re: Font.SERIF_STYLE what's the use?

can somebody help with these questions?

................................................................................................
Tech On!
PTNews
more at On On On!
Contributor
azoc
Posts: 35
Registered: ‎09-15-2011
My Device: Torch 9800, Tour 9630

Re: Font.SERIF_STYLE what's the use?

[ Edited ]

Some fonts contain serif (along with bold, italic, etc.) data all in the same file. Others are standalone fonts, and usually have it in the name, like BBAlpha Serif. If you look in Options under Screen/Display, you'll see a list of fonts installed on the device.

If you're not sure whether a font has a serif variation, just try to use:

FontFamily fontFamily = FontFamily.forName("FontName");
Font font = fontFamily.getFont(Font.SERIF_STYLE, 14);
labelField.setFont(font);

 

Run it, and if the label's text has serifs, then you have your answer.

Trusted Contributor
jppedroso
Posts: 119
Registered: ‎04-29-2010
My Device: Curve 8520

Re: Font.SERIF_STYLE what's the use?

Thks a lot azoc. I will give a try and get back to this post.

 

best regards.

................................................................................................
Tech On!
PTNews
more at On On On!