OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 | 8 |
9 #include "SkAdvancedTypefaceMetrics.h" | 9 #include "SkAdvancedTypefaceMetrics.h" |
10 #include "SkTypes.h" | 10 #include "SkTypes.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 repeatedAdvances = 0; | 175 repeatedAdvances = 0; |
176 wildCardsInRun = trailingWildCards; | 176 wildCardsInRun = trailingWildCards; |
177 trailingWildCards = 0; | 177 trailingWildCards = 0; |
178 } | 178 } |
179 curRange.fAdvance.append(1, &advance); | 179 curRange.fAdvance.append(1, &advance); |
180 if (advance != kDontCareAdvance) { | 180 if (advance != kDontCareAdvance) { |
181 lastAdvance = advance; | 181 lastAdvance = advance; |
182 } | 182 } |
183 } | 183 } |
184 if (curRange.fStartId == lastIndex) { | 184 if (curRange.fStartId == lastIndex) { |
185 SkASSERT(prevRange); | |
186 if (!prevRange) { | 185 if (!prevRange) { |
187 fGlyphWidths.reset(); | 186 fGlyphWidths.reset(); |
188 return; // https://crbug.com/567031 | 187 return; // https://crbug.com/567031 |
189 } | 188 } |
190 } else { | 189 } else { |
191 FinishRange(&curRange, lastIndex - 1, WidthRange::kRange); | 190 FinishRange(&curRange, lastIndex - 1, WidthRange::kRange); |
192 fGlyphWidths.emplace_back(std::move(curRange)); | 191 fGlyphWidths.emplace_back(std::move(curRange)); |
193 } | 192 } |
194 } | 193 } |
OLD | NEW |