Bug 1910815 - Inflate glyph bounds to account for potential font hinting. r=aosmond

Differential Revision: https://phabricator.services.mozilla.com/D219403
This commit is contained in:
Lee Salzman 2024-08-18 23:17:52 +00:00
Родитель 19b94f38d6
Коммит 3d4233ed3e
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -4301,7 +4301,7 @@ bool SharedContextWebgl::DrawGlyphsAccel(ScaledFont* aFont,
if (xformBounds.IsEmpty()) {
return true;
}
IntRect fullBounds = RoundedOut(currentTransform.TransformBounds(*bounds));
IntRect fullBounds = RoundedOut(xformBounds);
IntRect clipBounds = fullBounds.Intersect(clipRect);
// Check if the bounds are completely clipped out.
if (clipBounds.IsEmpty()) {

Просмотреть файл

@ -1430,6 +1430,8 @@ Maybe<Rect> DrawTargetSkia::GetGlyphLocalBounds(
return Nothing();
}
// Inflate the bounds to account for potential font hinting.
bounds.Inflate(1);
return Some(bounds);
}