[ wxwindows-Patches-1767267 ] Improve error detection for MacFindFont

SourceForge.net noreply at sourceforge.net
Sun Nov 4 08:08:40 PST 2007


Patches item #1767267, was opened at 2007-08-03 20:58
Message generated for change (Comment added) made by vadz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1767267&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Mac specific
Group: bug fix
>Status: Pending
Resolution: None
>Priority: 4
Private: No
Submitted By: Thouis R. Jones (thouis)
Assigned to: Stefan Csomor (csomor)
Summary: Improve error detection for MacFindFont 

Initial Comment:
On the mac (via Cocoa), if a font's pointsize is set to 0, the error that results is:

wx._core.PyAssertionError: C++ assertion "status == noErr" failed at ../src/mac/carbon/font.cpp(381) in MacFindFont(): couldn't modify ATSU style

Which is not very informative.

This patch makes two changes to the warning above.  First, it includes the actual status code (to compare against the Cocoa docs).  Second, it detects what I expect is the most common case, a zero-pointsize font and adds that information to the assertion message if true.



----------------------------------------------------------------------

>Comment By: Vadim Zeitlin (vadz)
Date: 2007-11-04 17:08

Message:
Logged In: YES 
user_id=71618
Originator: NO

I wonder if it wouldn't be better to simply insert a wxCHECK( m_pointSize
> 0 ) in the beginning of this function instead of checking it after ATSU
function failed? This certainly looks simpler to me but I don't know
anything about this code...

----------------------------------------------------------------------

Comment By: Thouis R. Jones (thouis)
Date: 2007-08-03 21:11

Message:
Logged In: YES 
user_id=594588
Originator: YES

File Added: fontsize.warn.patch

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1767267&group_id=9863




More information about the wx-dev mailing list