Italic font style with CPTextField (or anything ...)?

28 views
Skip to first unread message

Qiushi (Billy) He

unread,
Jan 3, 2010, 10:01:52 PM1/3/10
to Cappuccino & Objective-J
I know I can make a CPTextField display bold text via:

[textField setFont:[CPFont boldSystemFontWithSize:<some number>]];

... but there doesn't seem to be a way to make text italic.

I've done a bit of googling and articles covering this topic seems to
mostly focus on fully featured WYSIWYG richtext editing. What I want
is simply: "given a string, display it in italic form". It doesn't
trike me as a very obscured use case ... am I doing/wanting something
wrong or is it that people who uses Cappuccino and ObjJ just never
wanted to display anything italic ....?

MURAOKA Yusuke

unread,
Jan 4, 2010, 12:29:38 AM1/4/10
to objec...@googlegroups.com
Hi,

I've seen the current code of CPFont.j, and there is no code for italic.
I think you can simply add something for italic by inheriting from CPFont
or using the builtin category feature if you would it globally.
Because a font object only has some information for font, and can
generate a CPString object for css.

> --
>
> You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
> To post to this group, send email to objec...@googlegroups.com.
> To unsubscribe from this group, send email to objectivej+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/objectivej?hl=en.
>
>

--
村岡 友介

Reply all
Reply to author
Forward
0 new messages