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

Side by Side Diff: src/pdf/SkPDFFont.cpp

Issue 1136283004: fix reference to _PerGlyphInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | 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 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 #include <ctype.h> 8 #include <ctype.h>
9 9
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 info = SkTBitOr<SkTypeface::PerGlyphInfo>( 837 info = SkTBitOr<SkTypeface::PerGlyphInfo>(
838 info, SkTypeface::kHAdvance_PerGlyphInfo); 838 info, SkTypeface::kHAdvance_PerGlyphInfo);
839 #endif 839 #endif
840 fontMetrics.reset( 840 fontMetrics.reset(
841 typeface->getAdvancedTypefaceMetrics(info, NULL, 0)); 841 typeface->getAdvancedTypefaceMetrics(info, NULL, 0));
842 #if defined (SK_SFNTLY_SUBSETTER) 842 #if defined (SK_SFNTLY_SUBSETTER)
843 if (fontMetrics.get() && 843 if (fontMetrics.get() &&
844 fontMetrics->fType != SkAdvancedTypefaceMetrics::kTrueType_Font) { 844 fontMetrics->fType != SkAdvancedTypefaceMetrics::kTrueType_Font) {
845 // Font does not support subsetting, get new info with advance. 845 // Font does not support subsetting, get new info with advance.
846 info = SkTBitOr<SkAdvancedTypefaceMetrics::PerGlyphInfo>( 846 info = SkTBitOr<SkAdvancedTypefaceMetrics::PerGlyphInfo>(
847 info, SkAdvancedTypefaceMetrics::kHAdvance_PerGlyphInfo); 847 info, kHAdvance_PerGlyphInfo);
848 fontMetrics.reset( 848 fontMetrics.reset(
849 typeface->getAdvancedTypefaceMetrics(info, NULL, 0)); 849 typeface->getAdvancedTypefaceMetrics(info, NULL, 0));
850 } 850 }
851 #endif 851 #endif
852 } 852 }
853 853
854 SkPDFFont* font = SkPDFFont::Create(canon, fontMetrics.get(), typeface, 854 SkPDFFont* font = SkPDFFont::Create(canon, fontMetrics.get(), typeface,
855 glyphID, relatedFontDescriptor); 855 glyphID, relatedFontDescriptor);
856 canon->addFont(font, fontID, font->fFirstGlyphID); 856 canon->addFont(font, fontID, font->fFirstGlyphID);
857 return font; 857 return font;
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 } 1418 }
1419 if (existingFont != NULL) { 1419 if (existingFont != NULL) {
1420 return (existingFont->fFirstGlyphID <= searchGlyphID && 1420 return (existingFont->fFirstGlyphID <= searchGlyphID &&
1421 searchGlyphID <= existingFont->fLastGlyphID) 1421 searchGlyphID <= existingFont->fLastGlyphID)
1422 ? SkPDFFont::kExact_Match 1422 ? SkPDFFont::kExact_Match
1423 : SkPDFFont::kRelated_Match; 1423 : SkPDFFont::kRelated_Match;
1424 } 1424 }
1425 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match 1425 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match
1426 : SkPDFFont::kRelated_Match; 1426 : SkPDFFont::kRelated_Match;
1427 } 1427 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698