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

Unified Diff: src/core/SkAdvancedTypefaceMetrics.cpp

Issue 113093004: [PDF] Fix font width generation when glyph 0 is used. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkAdvancedTypefaceMetrics.cpp
diff --git a/src/core/SkAdvancedTypefaceMetrics.cpp b/src/core/SkAdvancedTypefaceMetrics.cpp
index ce64a42d0a9bfb2cbce7d7d405c3db4d217b2254..f9b25dc96aac1808cf59e6dbea403fa3d8e2024c 100644
--- a/src/core/SkAdvancedTypefaceMetrics.cpp
+++ b/src/core/SkAdvancedTypefaceMetrics.cpp
@@ -169,6 +169,8 @@ SkAdvancedTypefaceMetrics::AdvanceMetric<Data>* getAdvanceData(
Data advance = kInvalidAdvance;
if (gId < lastIndex) {
// Get glyph id only when subset is NULL, or the id is in subset.
+ SkASSERT(!subsetGlyphIDs || (subsetIndex < subsetGlyphIDsLength &&
+ static_cast<uint32_t>(gId) <= subsetGlyphIDs[subsetIndex]));
if (!subsetGlyphIDs ||
(subsetIndex < subsetGlyphIDsLength &&
static_cast<uint32_t>(gId) == subsetGlyphIDs[subsetIndex])) {
« no previous file with comments | « no previous file | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698