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

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

Issue 1139123008: Revert of Font variations. (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 | « src/fonts/SkFontMgr_fontconfig.cpp ('k') | src/ports/SkFontConfigParser_android.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 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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 880
881 // static 881 // static
882 SkPDFFont* SkPDFFont::Create(SkPDFCanon* canon, 882 SkPDFFont* SkPDFFont::Create(SkPDFCanon* canon,
883 const SkAdvancedTypefaceMetrics* info, 883 const SkAdvancedTypefaceMetrics* info,
884 SkTypeface* typeface, 884 SkTypeface* typeface,
885 uint16_t glyphID, 885 uint16_t glyphID,
886 SkPDFDict* relatedFontDescriptor) { 886 SkPDFDict* relatedFontDescriptor) {
887 SkAdvancedTypefaceMetrics::FontType type = 887 SkAdvancedTypefaceMetrics::FontType type =
888 info ? info->fType : SkAdvancedTypefaceMetrics::kOther_Font; 888 info ? info->fType : SkAdvancedTypefaceMetrics::kOther_Font;
889 889
890 if (info && (info->fFlags & SkAdvancedTypefaceMetrics::kMultiMaster_FontFlag )) { 890 if (info &&
891 (info->fFlags & SkAdvancedTypefaceMetrics::kMultiMaster_FontFlag)) {
892 NOT_IMPLEMENTED(true, true);
891 return new SkPDFType3Font(info, typeface, glyphID); 893 return new SkPDFType3Font(info, typeface, glyphID);
892 } 894 }
893 if (type == SkAdvancedTypefaceMetrics::kType1CID_Font || 895 if (type == SkAdvancedTypefaceMetrics::kType1CID_Font ||
894 type == SkAdvancedTypefaceMetrics::kTrueType_Font) { 896 type == SkAdvancedTypefaceMetrics::kTrueType_Font) {
895 SkASSERT(relatedFontDescriptor == NULL); 897 SkASSERT(relatedFontDescriptor == NULL);
896 return new SkPDFType0Font(info, typeface); 898 return new SkPDFType0Font(info, typeface);
897 } 899 }
898 if (type == SkAdvancedTypefaceMetrics::kType1_Font) { 900 if (type == SkAdvancedTypefaceMetrics::kType1_Font) {
899 return new SkPDFType1Font(info, typeface, glyphID, 901 return new SkPDFType1Font(info, typeface, glyphID,
900 relatedFontDescriptor); 902 relatedFontDescriptor);
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 } 1418 }
1417 if (existingFont != NULL) { 1419 if (existingFont != NULL) {
1418 return (existingFont->fFirstGlyphID <= searchGlyphID && 1420 return (existingFont->fFirstGlyphID <= searchGlyphID &&
1419 searchGlyphID <= existingFont->fLastGlyphID) 1421 searchGlyphID <= existingFont->fLastGlyphID)
1420 ? SkPDFFont::kExact_Match 1422 ? SkPDFFont::kExact_Match
1421 : SkPDFFont::kRelated_Match; 1423 : SkPDFFont::kRelated_Match;
1422 } 1424 }
1423 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match 1425 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match
1424 : SkPDFFont::kRelated_Match; 1426 : SkPDFFont::kRelated_Match;
1425 } 1427 }
OLDNEW
« no previous file with comments | « src/fonts/SkFontMgr_fontconfig.cpp ('k') | src/ports/SkFontConfigParser_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698