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

Side by Side Diff: Source/WebCore/svg/SVGFontData.cpp

Issue 11845002: Merge 138316 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp ('k') | no next file » | 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) 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 Vector<SVGGlyph> glyphs; 182 Vector<SVGGlyph> glyphs;
183 size_t altGlyphNamesSize = altGlyphNames.size(); 183 size_t altGlyphNamesSize = altGlyphNames.size();
184 if (altGlyphNamesSize) { 184 if (altGlyphNamesSize) {
185 for (size_t index = 0; index < altGlyphNamesSize; ++index) 185 for (size_t index = 0; index < altGlyphNamesSize; ++index)
186 associatedFontElement->collectGlyphsForGlyphName(altGlyphNames[index ], glyphs); 186 associatedFontElement->collectGlyphsForGlyphName(altGlyphNames[index ], glyphs);
187 187
188 // Assign the unicodeStringLength now that its known. 188 // Assign the unicodeStringLength now that its known.
189 size_t glyphsSize = glyphs.size(); 189 size_t glyphsSize = glyphs.size();
190 for (size_t i = 0; i < glyphsSize; ++i) 190 for (size_t i = 0; i < glyphsSize; ++i)
191 glyphs[i].unicodeStringLength = run.length(); 191 glyphs[i].unicodeStringLength = run.length();
192
193 // Do not check alt glyphs for compatibility. Just return the first one.
194 // Later code will fail if we do not do this and the glyph is incompatib le.
195 if (glyphsSize) {
196 SVGGlyph& svgGlyph = glyphs[0];
197 iterator.setLastGlyphName(svgGlyph.glyphName);
198 glyphData.glyph = svgGlyph.tableEntry;
199 advanceLength = svgGlyph.unicodeStringLength;
200 return true;
201 }
192 } else 202 } else
193 associatedFontElement->collectGlyphsForString(remainingTextInRun, glyphs ); 203 associatedFontElement->collectGlyphsForString(remainingTextInRun, glyphs );
194 204
195 size_t glyphsSize = glyphs.size(); 205 size_t glyphsSize = glyphs.size();
196 for (size_t i = 0; i < glyphsSize; ++i) { 206 for (size_t i = 0; i < glyphsSize; ++i) {
197 SVGGlyph& svgGlyph = glyphs[i]; 207 SVGGlyph& svgGlyph = glyphs[i];
198 if (svgGlyph.isPartOfLigature) 208 if (svgGlyph.isPartOfLigature)
199 continue; 209 continue;
200 if (!isCompatibleGlyph(svgGlyph, isVerticalText, language, arabicForms, currentCharacter, currentCharacter + svgGlyph.unicodeStringLength)) 210 if (!isCompatibleGlyph(svgGlyph, isVerticalText, language, arabicForms, currentCharacter, currentCharacter + svgGlyph.unicodeStringLength))
201 continue; 211 continue;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 mirroredCharacters.append(U16_TRAIL(character)); 304 mirroredCharacters.append(U16_TRAIL(character));
295 } 305 }
296 } 306 }
297 307
298 return mirroredCharacters.toString(); 308 return mirroredCharacters.toString();
299 } 309 }
300 310
301 } // namespace WebCore 311 } // namespace WebCore
302 312
303 #endif 313 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698