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

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

Issue 642863005: Consolidate Font::codePath kerning & ligatures exceptions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/platform/fonts/Font.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 }; 72 };
73 73
74 SVGTextMetricsCalculator::SVGTextMetricsCalculator(RenderSVGInlineText* text) 74 SVGTextMetricsCalculator::SVGTextMetricsCalculator(RenderSVGInlineText* text)
75 : m_text(text) 75 : m_text(text)
76 , m_bidiRun(0) 76 , m_bidiRun(0)
77 , m_run(SVGTextMetrics::constructTextRun(text, 0, text->textLength())) 77 , m_run(SVGTextMetrics::constructTextRun(text, 0, text->textLength()))
78 , m_isComplexText(false) 78 , m_isComplexText(false)
79 , m_totalWidth(0) 79 , m_totalWidth(0)
80 { 80 {
81 const Font& scaledFont = text->scaledFont(); 81 const Font& scaledFont = text->scaledFont();
82 CodePath codePath = scaledFont.codePath(m_run); 82 CodePath codePath = scaledFont.codePath(TextRunPaintInfo(m_run));
83 m_isComplexText = codePath == ComplexPath; 83 m_isComplexText = codePath == ComplexPath;
84 m_run.setCharacterScanForCodePath(!m_isComplexText); 84 m_run.setCharacterScanForCodePath(!m_isComplexText);
85 m_run.setUseComplexCodePath(m_isComplexText); 85 m_run.setUseComplexCodePath(m_isComplexText);
86 86
87 if (!m_isComplexText) 87 if (!m_isComplexText)
88 m_simpleShaper = adoptPtr(new SimpleShaper(&scaledFont, m_run)); 88 m_simpleShaper = adoptPtr(new SimpleShaper(&scaledFont, m_run));
89 else 89 else
90 setupBidiRuns(); 90 setupBidiRuns();
91 } 91 }
92 92
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 271
272 void SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes(RenderSVGText* textR oot, RenderSVGInlineText* stopAtLeaf, SVGCharacterDataMap& allCharactersMap) 272 void SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes(RenderSVGText* textR oot, RenderSVGInlineText* stopAtLeaf, SVGCharacterDataMap& allCharactersMap)
273 { 273 {
274 ASSERT(textRoot); 274 ASSERT(textRoot);
275 MeasureTextData data(&allCharactersMap); 275 MeasureTextData data(&allCharactersMap);
276 walkTree(textRoot, stopAtLeaf, &data); 276 walkTree(textRoot, stopAtLeaf, &data);
277 } 277 }
278 278
279 } 279 }
OLDNEW
« no previous file with comments | « no previous file | Source/platform/fonts/Font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698