[pywin32-bugs] [ pywin32-Bugs-1879894 ] CreateFont 'italic' keyword is working improperly
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2008-01-26 17:40:08
|
Bugs item #1879894, was opened at 2008-01-25 12:51 Message generated for change (Comment added) made by rupole You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1879894&group_id=78018 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: pythonwin Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Sergei Cherepanov (insane_hunter) Assigned to: Nobody/Anonymous (nobody) Summary: CreateFont 'italic' keyword is working improperly Initial Comment: dc.CreateFont creates an italic font when 'italic' key is just specified, despite its value, e.g. dc.CreateFont({'name': 'My font', ..., 'italic': False}) creates italicized font and dc.CreateFont({'name': 'My font', ...}) creates regular one. Possible reason: /pywin32/Pythonwin/win32util.cpp rev. 1.12 DictToLogFont function: 317 318 v = PyDict_GetItemString (font_props, (char *)szFontItalic); 319 if (v != NULL && v != Py_None) 320 pLF->lfItalic = TRUE; 321 Seems to ignore the value stored in dict parameter. ---------------------------------------------------------------------- >Comment By: Roger Upole (rupole) Date: 2008-01-26 12:40 Message: Logged In: YES user_id=771074 Originator: NO This has been fixed by calling PyObject_IsTrue on the object in the dict. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1879894&group_id=78018 |