| 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 #include <ctype.h> | 8 #include <ctype.h> |
| 9 | 9 |
| 10 #include "SkData.h" | 10 #include "SkData.h" |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 | 878 |
| 879 // static | 879 // static |
| 880 SkPDFFont* SkPDFFont::Create(SkPDFCanon* canon, | 880 SkPDFFont* SkPDFFont::Create(SkPDFCanon* canon, |
| 881 const SkAdvancedTypefaceMetrics* info, | 881 const SkAdvancedTypefaceMetrics* info, |
| 882 SkTypeface* typeface, | 882 SkTypeface* typeface, |
| 883 uint16_t glyphID, | 883 uint16_t glyphID, |
| 884 SkPDFDict* relatedFontDescriptor) { | 884 SkPDFDict* relatedFontDescriptor) { |
| 885 SkAdvancedTypefaceMetrics::FontType type = | 885 SkAdvancedTypefaceMetrics::FontType type = |
| 886 info ? info->fType : SkAdvancedTypefaceMetrics::kOther_Font; | 886 info ? info->fType : SkAdvancedTypefaceMetrics::kOther_Font; |
| 887 | 887 |
| 888 if (info && | 888 if (info && (info->fFlags & SkAdvancedTypefaceMetrics::kMultiMaster_FontFlag
)) { |
| 889 (info->fFlags & SkAdvancedTypefaceMetrics::kMultiMaster_FontFlag)) { | |
| 890 NOT_IMPLEMENTED(true, true); | |
| 891 return new SkPDFType3Font(info, typeface, glyphID); | 889 return new SkPDFType3Font(info, typeface, glyphID); |
| 892 } | 890 } |
| 893 if (type == SkAdvancedTypefaceMetrics::kType1CID_Font || | 891 if (type == SkAdvancedTypefaceMetrics::kType1CID_Font || |
| 894 type == SkAdvancedTypefaceMetrics::kTrueType_Font) { | 892 type == SkAdvancedTypefaceMetrics::kTrueType_Font) { |
| 895 SkASSERT(relatedFontDescriptor == NULL); | 893 SkASSERT(relatedFontDescriptor == NULL); |
| 896 return new SkPDFType0Font(info, typeface); | 894 return new SkPDFType0Font(info, typeface); |
| 897 } | 895 } |
| 898 if (type == SkAdvancedTypefaceMetrics::kType1_Font) { | 896 if (type == SkAdvancedTypefaceMetrics::kType1_Font) { |
| 899 return new SkPDFType1Font(info, typeface, glyphID, | 897 return new SkPDFType1Font(info, typeface, glyphID, |
| 900 relatedFontDescriptor); | 898 relatedFontDescriptor); |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 } | 1414 } |
| 1417 if (existingFont != NULL) { | 1415 if (existingFont != NULL) { |
| 1418 return (existingFont->fFirstGlyphID <= searchGlyphID && | 1416 return (existingFont->fFirstGlyphID <= searchGlyphID && |
| 1419 searchGlyphID <= existingFont->fLastGlyphID) | 1417 searchGlyphID <= existingFont->fLastGlyphID) |
| 1420 ? SkPDFFont::kExact_Match | 1418 ? SkPDFFont::kExact_Match |
| 1421 : SkPDFFont::kRelated_Match; | 1419 : SkPDFFont::kRelated_Match; |
| 1422 } | 1420 } |
| 1423 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match | 1421 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match |
| 1424 : SkPDFFont::kRelated_Match; | 1422 : SkPDFFont::kRelated_Match; |
| 1425 } | 1423 } |
| OLD | NEW |