All UIFont objects created in the debugger have a point size of 0

Originator:futuretap
Number:rdar://11934937 Date Originated:23-Jul-2012 02:59 PM
Status:Duplicate/10924364/Closed Resolved:
Product:Developer Tools Product Version:4.3.3
Classification:Other Bug Reproducible:Always
 
I recently had to debug a text sizing issue involving -[NSString sizeWithFont:]. I wondered why I had different results in code and the debugger. It boiled down to this line in the debugger (LLDB or GDB doesn't matter):

(gdb) p (CGFloat) [[UIFont systemFontOfSize:12.0f] pointSize]
$3 = 0

(gdb) po [UIFont systemFontOfSize:12.0f]
<UICFFont: 0x8e4b720> font-family: ".Helvetica NeueUI"; font-weight: normal; font-style: normal; font-size: 0px


So the UIFont object allocated in the debugger has the right fontName and other attributes but always a font size of 0.

This was reproducible:

- in Xcode 4.3.3 on 10.7
- in Xcode 4.5 DP 3 on 10.7
- in Xcode 4.4 DP 7 on 10.8 beta
- in the Simulator (running iOS 5.1 and 6.0 beta 3)
- on iPhone 4S (running iOS 6.0 beta 3)

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!