Bug 140673: Some Arabic/Hebrew bitmap fonts printed way too small with Xprint. Patch by Roland.Mainz@informatik.med.uni-giessen.de, r=smontagu, sr=dveditz, a=scc

This commit is contained in:
jaggernaut%netscape.com 2002-07-18 04:26:35 +00:00
parent 213d9bd6fc
commit 9101286f0d
2 changed files with 36 additions and 2 deletions

View File

@ -4079,9 +4079,26 @@ GetFontNames(const char* aPattern, PRBool aAnyFoundry, PRBool aOnlyOutlineScaled
continue;
if (gScaleBitmapFontsWithDevScale && (gDevScale > 1.0f)) {
/* Add a font size which is exactly scaled as the scaling factor ... */
if (!NodeAddSize(stretch, pixels, points, gDevScale, resX, resY, name, familyName, weightName,
slant, setWidth, addStyle, spacing, charSetName, charSetInfo))
slant, setWidth, addStyle, spacing, charSetName, charSetInfo))
continue;
/* ... and offer a range of scaled fonts with integer scaling factors
* (we're taking half steps between integers, too - to avoid too big
* steps between font sizes) */
float minScaler = PR_MAX(gDevScale / 2.0f, 1.5f),
maxScaler = gDevScale * 2.f,
scaler;
for( scaler = minScaler ; scaler <= maxScaler ; scaler += 0.5f )
{
if (!NodeAddSize(stretch, pixels, points, scaler, resX, resY, name, familyName, weightName,
slant, setWidth, addStyle, spacing, charSetName, charSetInfo))
break;
}
if (scaler <= maxScaler) {
continue; /* |NodeAddSize| returned an error in the loop above... */
}
}
}
}

View File

@ -4467,9 +4467,26 @@ GetFontNames(const char* aPattern, PRBool aAnyFoundry, PRBool aOnlyOutlineScaled
continue;
if (gScaleBitmapFontsWithDevScale && (gDevScale > 1.0f)) {
/* Add a font size which is exactly scaled as the scaling factor ... */
if (!NodeAddSize(stretch, pixels, points, gDevScale, resX, resY, name, familyName, weightName,
slant, setWidth, addStyle, spacing, charSetName, charSetInfo))
slant, setWidth, addStyle, spacing, charSetName, charSetInfo))
continue;
/* ... and offer a range of scaled fonts with integer scaling factors
* (we're taking half steps between integers, too - to avoid too big
* steps between font sizes) */
float minScaler = PR_MAX(gDevScale / 2.0f, 1.5f),
maxScaler = gDevScale * 2.f,
scaler;
for( scaler = minScaler ; scaler <= maxScaler ; scaler += 0.5f )
{
if (!NodeAddSize(stretch, pixels, points, scaler, resX, resY, name, familyName, weightName,
slant, setWidth, addStyle, spacing, charSetName, charSetInfo))
break;
}
if (scaler <= maxScaler) {
continue; /* |NodeAddSize| returned an error in the loop above... */
}
}
}
}