problem with adding custom font in Xcode 4.3.2

Apr 13, 2012

    Well, I guess John Muchow's blog Load and Access Custom Fonts" pretty much said everything about adding custom font before xcode 4.3.2. Before Xcode 4.3.2, when you add custom font, you need to make sure name of font you use in following code snippet:
[label2 setFont: [UIFont fontWithName: @"BlackBoard" size:18]];
        

Where is my font ?

    the "BlarkBoard" is the real name when you install it on mac. So the file name you just add to Resource and plist file , like "BlackBoard.ttf" is always the same the name of font that installed on mac.So you need to open that font file in FontBook, and write the name showing up down, like "Black BoardSb".     Then when you want to refer to font in the code:
[label2 setFont: [UIFont fontWithName: @"Black BoardSb" size:18]];
    That is so important and it is always easy to forget about. Actually there is one way to debug it when the fonts doesn't show up as you expected by using:
NSLog(@"Available fonts: %@", [UIFont familyNames]);
    So far, all is good.         

But if you use Xcode 4.3.2......

   But if you use Xcode 4.3.2, although you are very sure that every steps above are done properly, you still can't find the font you expected in the log message of [UIFont familyNames]. Here is the reason:           You have to go to "Copy Bundle Resources" in "Build Phases" of your project, and add font file to that list. Screen Shot 2012-04-13 at 6.24.59 PM     Then run the project. Bang! It works now.     I've no freaking idea what's going on.It seems there is a bug relating to custom font in Xcode 4.3.2.