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

Posts: 76
Registered: ‎02-08-2013
My Device: z10
My Carrier: rogers

Overridding HTML Font Size

I'm working with HTML texts that have inconsistent font sizes, I want to make them all appear the same size. I can't do anything about the HTML input itself.


I'm stuffing some the of HTML encoded text into a QLabel and have tried all sort of things to override the font size defined in the HTML code. Is this even possible?


These had no impact on the text size.

mItemDescLabel->textStyle()->setFontSize(bb::cascades::FontSize:Smiley Frustratedmall);





Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Overridding HTML Font Size

HTML isn't really "encoded", it's just a markup language. So you could find the markup you wanted to change and modify the string yourself. Or strip out all the HTML and do your own formatting, depending on your use case.

Paul Bernhardt
Application Development Consultant

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker