Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fonts not displaying in Interface Builder

For some reason many of the fonts will not display in Interface Builder when I am designing my iPad app. Unfortunately my iPad is yet to be delivered so I cannot tell if this is going to be a problem in the long run, but it certainly maintains through to the simulator.

The fonts in question are listed on various websites as being compatible with the iPad but SDK 4.0.1 still seems to be confused.

For example Hoefler Text font assigned to a label drawn directly on fresh iPad view displays using the default font. If I click to edit the text it displays in the correct font. I've tried it on a couple of macs now

This is a problem as I need to send through the app mock ups to my client to sign of the pixel perfect layouts for their backend team :(

Any ideas?!

like image 582
Anthony Main Avatar asked Aug 03 '10 16:08

Anthony Main


People also ask

How to add fonts to Xcode project?

To add a font file to your Xcode project, select File > Add Files to “Your Project Name” from the menu bar, or drag the file from Finder and drop it into your Xcode project. You can add True Type Font (. ttf) and Open Type Font (. otf) files.


1 Answers

For others who might be interested: there is a bug/known issue with IB on XCode 3.x with non-standard fonts and Interface Builder. Custom fonts generally need to be set programatically (via [UIFont fontWithName...).

For mockups you should use a tool like PhotoShop, etc rather than Interface Builder.

like image 82
lxt Avatar answered Sep 20 '22 23:09

lxt