зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1919040 - Allow choosing scales < 1.0 for SVG text. r=longsonr
This matches the previous behavior. The test in question has a scale of 0.1 in the test, which changes our font choice and uses simpler glyph advances. Differential Revision: https://phabricator.services.mozilla.com/D222422
This commit is contained in:
Родитель
35a06f02b9
Коммит
d998d6d499
|
@ -367,10 +367,10 @@ static float GetContextScale(SVGTextFrame* aFrame) {
|
|||
RelativeTo{aFrame}, RelativeTo{SVGUtils::GetOuterSVGFrame(aFrame)});
|
||||
Matrix transform2D;
|
||||
if (!matrix.CanDraw2D(&transform2D)) {
|
||||
return {};
|
||||
return 1.0f;
|
||||
}
|
||||
auto scales = transform2D.ScaleFactors();
|
||||
return std::max(1.0f, std::max(scales.xScale, scales.yScale));
|
||||
return std::max(0.0f, std::max(scales.xScale, scales.yScale));
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
|
Загрузка…
Ссылка в новой задаче