uifont

How do I set the font of an UI element to the "System" font in IB?

How do I set the font of an UI element (ex. UILabel) to the "System" font in IB? In code, I know I can do the following: UIFont * tempFont = [[UIFont systemFontOfSize:24] retain]; But what about doing the same thing in IB? What is the default system font on the IPhone? ...

Setting UILabel - Font through code - generates error - iPhone

See following code carefully. Because it works perfectly. Try to add in your application. it will work - (void)viewDidLoad { [super viewDidLoad]; // title label - tip UILabel *tmp=[[UILabel alloc] initWithFrame:CGRectMake(50, 50, 200, 200)]; tmp.textColor=[UIColor colorWithRed:(14.0/255.0) green:(105.0/255) blue:(128.0/255) alpha:1.0];...

How to get subString of a page of a long NSString, font size variable?

I have a very long text, I defined it as NSString, so I need paging, there will be different paging for different fonts, say I'd like to display one page on a multiple line UILabel. So at frist I need to get substring of page by page of the long string. Does anyone know good solution for this? Thanks in advance. I know there is a NSStr...

How to change an UILabel/UIFont's letter spacing?

Hi, I've searched loads already and couldn't find an answer. I have a normal UILabel, defined this way: UILabel *totalColors = [[[UILabel alloc] initWithFrame:CGRectMake(5, 7, 120, 69)] autorelease]; totalColors.text = [NSString stringWithFormat:@"%d", total]; totalColors.font = [UIFont fontWithName:@"Arial-BoldMT" size:60...

Determining whether or not a font can render a Unicode character in Cocoa Touch

Hi folks, I'm wondering if there's a way to determine whether or not a font supports a particular Unicode character in Cocoa Touch. Alternatively, is it possible to specify the default substitute character? ...

iPhone - Strike out an NSString

Hi everyone, I would like to know if there is an easy way to strike/cross out some text on the iPhone? Thanks ...

iPhone SDK 3.2 and UIAppFonts

I've added my custom font to UIAppFonts and it's loaded just fine: (shows up in [UIFont familyNames] ). When I manually set the font in viewDidLoad { [myLabel setFont: [UIFont fontWithName:@"CustomFont" size: 65.0]]; } everything works and the font is rendered. However doing the same thing in IB doesn't (some other default font is use...

How can I add Copperplate Gothic Bold font in my iPhone program ?

Hi, I need to display some text in cocos2d layer. I added UITextView to it. I added the text in the text View. But, for setting the font by ( UIFont class), I could not do it. I saw the list of supported fonts for iPhone, In that list Copperplate Gothic Bold is not there. I downloaded it from net. It is working good for CCLabel and CCF...

Which are the fonts available in iphone sdk?

I want to know which all fonts are currently supported by iphone sdk. ...

UITextField causing MemoryWarning.

When one of the UITextFields I have becomes active it causes a Memory Warning, this is what I see in the console: Received memory warning. Level=2 The thing is that the UITextField has a Font Size 32, Bold, Courier New & I think that loading that specific font is causing the memory warning, is loading a font that "heavy"? if so why? I ...

How is the text adjusting inside the label when we increase the fontSize?

In some of the applications, I have seen that we have an option to increase or decrease the fontSize of the text inside the label. But when we adjust it, the label automatically increases its height to contain it. How do we get the height of the label everytime we increase or decrease the fontsize? And in some cases like news applicatio...

warning: incompatible Objective-C types

Warning: incompatible Objective-C types 'struct NSArray *', expected 'struct UIFont *' when passing argument 1 of 'setFont:' from distinct Objective-C type Code Like: lblTemp.font = [UIFont fontNamesForFamilyName:@"Arial"]; // Warning comes here lblTemp.font = [UIFont fontWithName:@"Arial-BoldMT" size:13]; [cell.contentVie...

[UIFont fontWithName: size] memory leak on iPhone iOS4?

I have function for adding UILabel to my view: UILabel* AddLabel(UIView* view,CGRect labelRect, UIStyle* labelStyle, NSString* labelText) { UILabel* label = [[[UILabel alloc] initWithFrame:labelRect] autorelease]; label.textColor = [UIColor colorWithCGColor:[ labelStyle.textColor CGColor]]; label.backgroundColor = [UIColor c...

how to add new font to Xcode 3.2?

hi all, please tell me how to add new font to iphone xcode3.2. thanks in advance. ...

UIFont and Diacriticals

I'm writing a iPhone app that needs to render i18n text that includes diacriticals (tildes, accents, etc.). Apple provides the UIFont class which can be used to get a given typeface/font-size combination's leading, ascent, descent, etc. The problem is that this information does not accurately reflect diacriticals. Specifically, diac...

UILabel sizeWithFont: problem. Clipping italic text.

I have created a UILabel that displays a single large character. Even with clipsToBounds = NO; I still get clipping. See link: http://img341.imageshack.us/img341/5310/screenshot20100814at243.png I used the following code: CGSize fBounds = [myLabel.text sizeWithFont:cFont]; To get what should be the bounding rectangle of the font. ...

How can I recreate this iOS font that has a shadow?

In the iOS clock app, the font in the table view cells has a slight shadow to it which gives the effect that the text is engraved.... How can I recreate that font with the engraved look? Thanks in advance for your help! ...

Did apple change default font size on uitableviewcell?

Hi, I have a strange problem where the font size in uitableviewcell (value 1 style..) is to big on my clients iphone. but not on any of my test devices. My client has 3.0.1 Did apple change the default size or is something else causing this? ...

How to set custom font in UIWebView?

Hello I have a font in the resources and I loaded it into a UIFont I want to know how to use this UIFont as the default font for my UIWebView Thanks in advance... ...

Which font is used by [UIFont systemFontOfSize:15]?

I'd like to use a UIWebView with the same typographical appearance as the rest of my app texts which all use [UIFont systemFontOfSize:15]. But before doing some forensic research maybe someone knows what font that really is? ...