Custom fonts not working on Xcode 4.3.1

Originator:cesarerocchi
Number:rdar://11098634 Date Originated:
Status:Open Resolved:NO
Product:XCode Product Version:4.3.1
Classification:UI Reproducible:Always
 
Summary:

Embed a custom font in a Xcode 4.3.1 project and it won't show in the list of available fonts.

Steps to Reproduce:

Drag a font in your project.
Set it up in the plist as follows

	<key>UIAppFonts</key>
	<array>
		<string>Unicredit.otf</string>
	</array>

Use this code in the app delegate to show the list of available fonts

    NSArray *listOfFonts = [[NSArray alloc] initWithArray:[UIFont familyNames]];
    NSLog(@"fonts len %i", listOfFonts.count);
        
        for (NSString *fonts in listOfFonts) {
            NSLog(@"Font family: %@", fonts);
            NSArray *subFontTypes = [NSArray arrayWithArray:[UIFont fontNamesForFamilyName:fonts]];
            for (NSString *fontName in subFontTypes) {
                NSLog(@"+--> Font name: %@", fontName);
            }
        }

Expected Results:

The custom font should show up in the list

Actual Results:

The custom font does not show up in the list

Regression:

Notes:

The same procedure works correctly on Xcode 4.2

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!