Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: Source/core/rendering/svg/SVGTextLayoutEngine.cpp

Issue 234453002: Remove SVG1.1 kerning property (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More TestExpectations updates Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 503
504 // Assign current text position to x/y values, if needed. 504 // Assign current text position to x/y values, if needed.
505 updateCharacerPositionIfNeeded(x, y); 505 updateCharacerPositionIfNeeded(x, y);
506 506
507 // Apply dx/dy value adjustments to current text position, if needed. 507 // Apply dx/dy value adjustments to current text position, if needed.
508 updateRelativePositionAdjustmentsIfNeeded(data.dx, data.dy); 508 updateRelativePositionAdjustmentsIfNeeded(data.dx, data.dy);
509 509
510 // Calculate SVG Fonts kerning, if needed. 510 // Calculate SVG Fonts kerning, if needed.
511 float kerning = spacingLayout.calculateSVGKerning(m_isVerticalText, visu alMetrics.glyph()); 511 float kerning = spacingLayout.calculateSVGKerning(m_isVerticalText, visu alMetrics.glyph());
512 512
513 // Calculate CSS 'kerning', 'letter-spacing' and 'word-spacing' for next character, if needed. 513 // Calculate CSS 'letter-spacing' and 'word-spacing' for next character, if needed.
514 float spacing = spacingLayout.calculateCSSKerningAndSpacing(svgStyle, le ngthContext, currentCharacter); 514 float spacing = spacingLayout.calculateCSSSpacing(currentCharacter);
515 515
516 float textPathOffset = 0; 516 float textPathOffset = 0;
517 if (m_inPathLayout) { 517 if (m_inPathLayout) {
518 float scaledGlyphAdvance = glyphAdvance * m_textPathScaling; 518 float scaledGlyphAdvance = glyphAdvance * m_textPathScaling;
519 if (m_isVerticalText) { 519 if (m_isVerticalText) {
520 // If there's an absolute y position available, it marks the beg inning of a new position along the path. 520 // If there's an absolute y position available, it marks the beg inning of a new position along the path.
521 if (y != SVGTextLayoutAttributes::emptyValue()) 521 if (y != SVGTextLayoutAttributes::emptyValue())
522 m_textPathCurrentOffset = y + m_textPathStartOffset; 522 m_textPathCurrentOffset = y + m_textPathStartOffset;
523 523
524 m_textPathCurrentOffset += m_dy - kerning; 524 m_textPathCurrentOffset += m_dy - kerning;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 645 }
646 646
647 if (!didStartTextFragment) 647 if (!didStartTextFragment)
648 return; 648 return;
649 649
650 // Close last open fragment, if needed. 650 // Close last open fragment, if needed.
651 recordTextFragment(textBox, visualMetricsValues); 651 recordTextFragment(textBox, visualMetricsValues);
652 } 652 }
653 653
654 } 654 }
OLDNEW
« no previous file with comments | « Source/core/rendering/style/SVGRenderStyleDefs.cpp ('k') | Source/core/rendering/svg/SVGTextLayoutEngineSpacing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698