Changeset 87846 in webkit
- Timestamp:
- Jun 1, 2011 2:00:56 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r87844 r87846 1 2011-06-01 Levi Weintraub <leviw@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Text is scaled in a stair-step pattern 6 https://bugs.webkit.org/show_bug.cgi?id=60317 7 8 Stop scaling the specified font to the actual on-screen value when font-rendering: 9 geometricPrecision is specified, but instead scale the graphics context. This allows 10 us to scale text up and down smoothly. 11 12 * platform/mac/svg/text/scaling-font-with-geometric-precision-expected.png: Added. 13 * platform/mac/svg/text/scaling-font-with-geometric-precision-expected.txt: Added. 14 * svg/text/scaling-font-with-geometric-precision.html: Added. 15 1 16 2011-06-01 Jer Noble <jer.noble@apple.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r87845 r87846 1 2011-06-01 Levi Weintraub <leviw@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Text is scaled in a stair-step pattern 6 https://bugs.webkit.org/show_bug.cgi?id=60317 7 8 Stop scaling the specified font to the actual on-screen value when font-rendering: 9 geometricPrecision is specified, but instead scale the graphics context. This allows 10 us to scale text up and down smoothly. 11 12 Test: svg/text/scaling-font-with-geometric-precision.html 13 14 * rendering/svg/RenderSVGInlineText.cpp: 15 (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle): 16 1 17 2011-06-01 Levi Weintraub <leviw@chromium.org> 2 18 -
trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
r86135 r87846 236 236 Document* document = renderer->document(); 237 237 ASSERT(document); 238 238 239 239 CSSStyleSelector* styleSelector = document->styleSelector(); 240 240 ASSERT(styleSelector); 241 241 242 // Alter font-size to the right on-screen value , to avoid scaling the glyphs themselves.242 // Alter font-size to the right on-screen value to avoid scaling the glyphs themselves, except when GeometricPrecision is specified 243 243 AffineTransform ctm; 244 244 SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(renderer, ctm); 245 245 scalingFactor = narrowPrecisionToFloat(sqrt((pow(ctm.xScale(), 2) + pow(ctm.yScale(), 2)) / 2)); 246 if (scalingFactor == 1 || !scalingFactor ) {246 if (scalingFactor == 1 || !scalingFactor || style->fontDescription().textRenderingMode() == GeometricPrecision) { 247 247 scalingFactor = 1; 248 248 scaledFont = style->font();
Note: See TracChangeset
for help on using the changeset viewer.