mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 906704 - fix infinite loop drawing rotated synthetic bold text. r=jrmuizel
This commit is contained in:
parent
702e2628d5
commit
08050e93bf
@ -757,9 +757,9 @@ gfxContext::UserToDevice(const gfxSize& size) const
|
||||
} else {
|
||||
const Matrix &matrix = mTransform;
|
||||
|
||||
gfxSize newSize = size;
|
||||
newSize.width = newSize.width * matrix._11 + newSize.height * matrix._12;
|
||||
newSize.height = newSize.width * matrix._21 + newSize.height * matrix._22;
|
||||
gfxSize newSize;
|
||||
newSize.width = size.width * matrix._11 + size.height * matrix._12;
|
||||
newSize.height = size.width * matrix._21 + size.height * matrix._22;
|
||||
return newSize;
|
||||
}
|
||||
}
|
||||
|
@ -2312,12 +2312,14 @@ gfxFont::Draw(gfxTextRun *aTextRun, uint32_t aStart, uint32_t aEnd,
|
||||
// synthetic-bold strikes are each offset one device pixel in run direction
|
||||
// (these values are only needed if IsSyntheticBold() is true)
|
||||
double synBoldOnePixelOffset = 0;
|
||||
int32_t strikes = 0;
|
||||
int32_t strikes = 1;
|
||||
if (IsSyntheticBold()) {
|
||||
double xscale = CalcXScale(aContext);
|
||||
synBoldOnePixelOffset = direction * xscale;
|
||||
// use as many strikes as needed for the the increased advance
|
||||
strikes = NS_lroundf(GetSyntheticBoldOffset() / xscale);
|
||||
if (xscale != 0.0) {
|
||||
// use as many strikes as needed for the the increased advance
|
||||
strikes = NS_lroundf(GetSyntheticBoldOffset() / xscale);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t i;
|
||||
|
Loading…
Reference in New Issue
Block a user