Applied patch #1875242 - fixing more bugs related to using OS/2's DevQueryCaps
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -281,11 +281,16 @@ void wxConvertVectorFontSize(
|
||||
// NOTE: 1 point == 1/72 of an inch.
|
||||
//
|
||||
|
||||
vSizef.cx = (FIXED)(((fxPointSize) / 72 ) * lXFontResolution );
|
||||
vSizef.cy = (FIXED)(((fxPointSize) / 72 ) * lYFontResolution );
|
||||
// multiply first to avoid getting vSizef.cx,cy = 0 since fxPointSize
|
||||
// is normally < 72 and FontResolution is typically ca. 100
|
||||
vSizef.cx = (FIXED)( (fxPointSize * lXFontResolution) / 72 );
|
||||
vSizef.cy = (FIXED)( (fxPointSize * lYFontResolution) / 72 );
|
||||
|
||||
pFattrs->lMaxBaselineExt = MAKELONG( HIUSHORT( vSizef.cy ), 0 );
|
||||
pFattrs->lAveCharWidth = MAKELONG( HIUSHORT( vSizef.cx ), 0 );
|
||||
if (pFattrs)
|
||||
{
|
||||
pFattrs->lMaxBaselineExt = MAKELONG( HIUSHORT( vSizef.cy ), 0 );
|
||||
pFattrs->lAveCharWidth = MAKELONG( HIUSHORT( vSizef.cx ), 0 );
|
||||
}
|
||||
WinReleasePS(hPS);
|
||||
|
||||
} // end of wxConvertVectorPointSize
|
||||
|
||||
Reference in New Issue
Block a user