зеркало из https://github.com/mozilla/gecko-dev.git
No bug - OS/2 only - font tweaks
This commit is contained in:
Родитель
ed5ced0bd4
Коммит
1dbd07d9d1
|
@ -181,9 +181,11 @@ void nsDeviceContextOS2 :: CommonInit(HDC aDC)
|
|||
|
||||
GFX (::DevQueryCaps(aDC, CAPS_FAMILY, CAPS_DEVICE_POLYSET_POINTS, alArray), FALSE);
|
||||
|
||||
// This change breaks opening and closing of sidebar
|
||||
// mTwipsToPixels = (float)alArray [CAPS_VERTICAL_RESOLUTION] / (float)NS_METERS_TO_TWIPS (1);
|
||||
mTwipsToPixels = ((float)alArray [CAPS_VERTICAL_FONT_RES]) / (float)NSIntPointsToTwips(72);
|
||||
// It would seem that Mozilla basically requires that mTwipsToPixels = 1/15 and
|
||||
// mPixelsToTwips = 15. Some side effects from not doing this are boxes drawing
|
||||
// wrong and fonts coming out incorrect.
|
||||
// mTwipsToPixels = ((float)alArray [CAPS_VERTICAL_FONT_RES]) / (float)NSIntPointsToTwips(72);
|
||||
mTwipsToPixels = 1.0f / 15.0f;
|
||||
|
||||
mPixelsToTwips = 1.0f / mTwipsToPixels;
|
||||
|
||||
|
|
|
@ -833,8 +833,9 @@ HDC ps = NULL;
|
|||
// Note: are you confused by the block above, and thinking that app2twip
|
||||
// must be 1? Well, there's *no* guarantee that app units are
|
||||
// twips, despite whatever nscoord.h says!
|
||||
int points = NSTwipsToFloorIntPoints( nscoord( mFont->size * app2twip * textZoom));
|
||||
fh->charbox.cx = MAKEFIXED( points * 20 * twip2dev, 0);
|
||||
LONG lHeight = NSToIntRound(mFont->size * app2dev * textZoom);
|
||||
int points = mFont->size/20;
|
||||
fh->charbox.cx = MAKEFIXED(lHeight, 0);
|
||||
fh->charbox.cy = fh->charbox.cx;
|
||||
|
||||
// 8) If we're using an image font, check it's available in the size
|
||||
|
@ -848,7 +849,6 @@ HDC ps = NULL;
|
|||
long lFonts = 0; int i;
|
||||
PFONTMETRICS pMetrics = getMetrics( lFonts, fh->fattrs.szFacename, ps);
|
||||
|
||||
|
||||
int curPoints = 0;
|
||||
for( i = 0; i < lFonts; i++) {
|
||||
if( !stricmp(fh->fattrs.szFacename, pMetrics[i].szFacename) &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче