зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
213d9bd6fc
Коммит
9101286f0d
|
@ -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... */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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... */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче