Opened 17 months ago

Closed 15 months ago

Last modified 14 months ago

#15999 closed defect (fixed)

Carbon/font.cpp issue on Mavericks 10.9

Reported by: jl-shoutr Owned by: csomor
Priority: normal Milestone:
Component: wxOSX-Carbon Version: 3.0.0
Keywords: osx font mavericks unstable Cc:
Blocked By: Blocking:
Patch: no


On 10.9 I have experienced the same issue as expressed here but no one seems to have submitted a ticket.

On wx-3.0.0 and 10.9 the following warnings are printing

CoreText performance note: Client called CTFontCreateWithName() using name ".Lucida Grande UI" and got font 
with PostScript name ".LucidaGrandeUI". For best performance, only use PostScript names when calling this API.

Although perfectly fine on 10.8, our application became very unstable on 10.9 and would crash before even loading. Following the advice in the above link, by changing the line

wxCFStringRef familyName( (CFStringRef) CTFontDescriptorCopyAttribute(descr, kCTFontFamilyNameAttribute));


wxCFStringRef familyName( (CFStringRef) CTFontDescriptorCopyAttribute(descr, kCTFontNameAttribute));

Using a new build of wx, the application is now stable on 10.9, and works as before on 10.8.

Change History (6)

comment:1 Changed 17 months ago by csomor

  • Owner set to csomor
  • Status changed from new to accepted

Thanks for the hints, I cannot think however that this change fixes the crashes - it's good for the performance warning of course. I'd rather think that other fixes in trunk are the reason for the stability. Just to make sure, could you please just change that one line back, and test ?



comment:2 Changed 16 months ago by nat_echols

Can you clarify if this is supposed to fix the same CoreText warnings in wxOSX-Cocoa as well? I found it necessary to additionally change font.cpp to replace "Lucida Grande" with "LucidaGrande" to get the warning to go away, but this seems like a huge hack.

comment:3 Changed 16 months ago by SC

(In [76036]) using a lazy translation hash map for conversion between user friendly names and postscript names, so that we get only one warning per font family. The only way to completely get rid of this would be to pre-populate the map during startup which would mean to completely iterate through all installed fonts, so it's a compromise. see #15999

comment:4 Changed 15 months ago by SC

  • Resolution set to fixed
  • Status changed from accepted to closed

In 76393:

in order to get rid of the warnings completely use the former font descriptor creation sequence and cache the result immediately, fixes #15999

comment:5 Changed 14 months ago by SC

In 76396:

backport, get rid of performance warnings "For best performance, only use PostScript names when calling this API", see #15999

comment:6 Changed 14 months ago by SC

In 76397:

backport, get rid of performance warnings "For best performance, only use PostScript names when calling this API", see #15999

Note: See TracTickets for help on using tickets.