0

Set a Label to have normal and italic font

asked 2010-03-24 03:09:34 +0800

yunchang83 gravatar image yunchang83
42

Hi, i am quite puzzled on whether one label can have italic and normal font style together? i know this is not possible even in conventional controls. was just wondering whether zk does provide this kind of functionality? say label B is "ABC DEF"? or do i have to create 2 controls separately just to show one is italic style and the other normal style?

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2010-03-24 09:24:17 +0800

xmedeko gravatar image xmedeko
1031 1 16
http://xmedeko.blogspot.c...

Yes, create two labels.

link publish delete flag offensive edit

answered 2010-03-24 21:18:08 +0800

Cogito gravatar image Cogito
66 1
ZK Team

Hi yunchang83,

ZK parses the value assigned to the label component from a single <span> tag, hence, you can't have a label having texts with different font style.
However, I don't think having to create two labels raises any difficulties :)

link publish delete flag offensive edit

answered 2020-06-28 01:23:48 +0800

FitBoy01 gravatar image FitBoy01
1

You can't just build a new random font on fly by instantly loading UIFontDescriptor artifacts with symbolic characteristics you like, and then instating a new font. If it is a regular font or one you manually applied, the font defined with the descriptor must already be present in the program. Just download the bold version as noted by Kye, add it to your project and use the name to instant a new font.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-03-24 03:09:34 +0800

Seen: 471 times

Last updated: Jun 28

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More