Opened 11 years ago

Closed 8 years ago

#12420 closed defect (fixed)

wxFontEnumerator::EnumerateFacenames(fixedWidthOnly=true) not implemented in wxOSX/Cocoa

Reported by: joostn Owned by:
Priority: normal Milestone:
Component: wxOSX Version: stable-latest
Keywords: wxFontEnumerator EnumerateFacenames fixedWidthOnly Cc: joost@…
Blocked By: Blocking:
Patch: no


wxFontEnumerator::EnumerateFacenames fails completely if only fixed width fonts are requested. This causes for example the 'help' sample (and my own app's help window..) to crash.

As long as fixedWidthOnly is not supported, wouldn't it be better to just return all fonts? The user can then choose an appropriate fixed pitch font.

See patch.

Attachments (1)

fontenum.patch download (491 bytes) - added by joostn 11 years ago.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by joostn

comment:1 Changed 10 years ago by vadz

  • Patch unset
  • Status changed from new to confirmed
  • Summary changed from wxOSX_Cocoa: wxFontEnumerator::EnumerateFacenames does a wxFAIL for fixedWidthOnly=true to wxFontEnumerator::EnumerateFacenames(fixedWidthOnly=true) not implemented in wxOSX/Cocoa

I think this method should return fixed width fonts only so I don't like the patch. And just removing wxFAIL won't help because the caller almost certainly doesn't expect to get nothing in return.

Maybe the simplest would be to hardcode a (or a few) well-known fixed width fonts always available under OS X? Does anybody know what could we use here?

comment:2 Changed 8 years ago by vadz

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

At least under 10.8.2, it works fine now (try Cmd-X in the font sample).

Note: See TracTickets for help on using tickets.