| 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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 && | 890 if (info && (info->fFlags & SkAdvancedTypefaceMetrics::kMultiMaster_FontFlag
)) { |
| 891 (info->fFlags & SkAdvancedTypefaceMetrics::kMultiMaster_FontFlag)) { | |
| 892 NOT_IMPLEMENTED(true, true); | |
| 893 return new SkPDFType3Font(info, typeface, glyphID); | 891 return new SkPDFType3Font(info, typeface, glyphID); |
| 894 } | 892 } |
| 895 if (type == SkAdvancedTypefaceMetrics::kType1CID_Font || | 893 if (type == SkAdvancedTypefaceMetrics::kType1CID_Font || |
| 896 type == SkAdvancedTypefaceMetrics::kTrueType_Font) { | 894 type == SkAdvancedTypefaceMetrics::kTrueType_Font) { |
| 897 SkASSERT(relatedFontDescriptor == NULL); | 895 SkASSERT(relatedFontDescriptor == NULL); |
| 898 return new SkPDFType0Font(info, typeface); | 896 return new SkPDFType0Font(info, typeface); |
| 899 } | 897 } |
| 900 if (type == SkAdvancedTypefaceMetrics::kType1_Font) { | 898 if (type == SkAdvancedTypefaceMetrics::kType1_Font) { |
| 901 return new SkPDFType1Font(info, typeface, glyphID, | 899 return new SkPDFType1Font(info, typeface, glyphID, |
| 902 relatedFontDescriptor); | 900 relatedFontDescriptor); |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1418 } | 1416 } |
| 1419 if (existingFont != NULL) { | 1417 if (existingFont != NULL) { |
| 1420 return (existingFont->fFirstGlyphID <= searchGlyphID && | 1418 return (existingFont->fFirstGlyphID <= searchGlyphID && |
| 1421 searchGlyphID <= existingFont->fLastGlyphID) | 1419 searchGlyphID <= existingFont->fLastGlyphID) |
| 1422 ? SkPDFFont::kExact_Match | 1420 ? SkPDFFont::kExact_Match |
| 1423 : SkPDFFont::kRelated_Match; | 1421 : SkPDFFont::kRelated_Match; |
| 1424 } | 1422 } |
| 1425 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match | 1423 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match |
| 1426 : SkPDFFont::kRelated_Match; | 1424 : SkPDFFont::kRelated_Match; |
| 1427 } | 1425 } |
| OLD | NEW |