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 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 return NULL; | 1004 return NULL; |
1005 } | 1005 } |
1006 SkPDFType0Font* newSubset = new SkPDFType0Font(fontInfo(), typeface()); | 1006 SkPDFType0Font* newSubset = new SkPDFType0Font(fontInfo(), typeface()); |
1007 newSubset->populate(subset); | 1007 newSubset->populate(subset); |
1008 return newSubset; | 1008 return newSubset; |
1009 } | 1009 } |
1010 | 1010 |
1011 #ifdef SK_DEBUG | 1011 #ifdef SK_DEBUG |
1012 void SkPDFType0Font::emitObject(SkWStream* stream, | 1012 void SkPDFType0Font::emitObject(SkWStream* stream, |
1013 const SkPDFObjNumMap& objNumMap, | 1013 const SkPDFObjNumMap& objNumMap, |
1014 const SkPDFSubstituteMap& substitutes) { | 1014 const SkPDFSubstituteMap& substitutes) const { |
1015 SkASSERT(fPopulated); | 1015 SkASSERT(fPopulated); |
1016 return INHERITED::emitObject(stream, objNumMap, substitutes); | 1016 return INHERITED::emitObject(stream, objNumMap, substitutes); |
1017 } | 1017 } |
1018 #endif | 1018 #endif |
1019 | 1019 |
1020 bool SkPDFType0Font::populate(const SkPDFGlyphSet* subset) { | 1020 bool SkPDFType0Font::populate(const SkPDFGlyphSet* subset) { |
1021 insertName("Subtype", "Type0"); | 1021 insertName("Subtype", "Type0"); |
1022 insertName("BaseFont", fontInfo()->fFontName); | 1022 insertName("BaseFont", fontInfo()->fFontName); |
1023 insertName("Encoding", "Identity-H"); | 1023 insertName("Encoding", "Identity-H"); |
1024 | 1024 |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1412 } | 1412 } |
1413 if (existingFont != NULL) { | 1413 if (existingFont != NULL) { |
1414 return (existingFont->fFirstGlyphID <= searchGlyphID && | 1414 return (existingFont->fFirstGlyphID <= searchGlyphID && |
1415 searchGlyphID <= existingFont->fLastGlyphID) | 1415 searchGlyphID <= existingFont->fLastGlyphID) |
1416 ? SkPDFFont::kExact_Match | 1416 ? SkPDFFont::kExact_Match |
1417 : SkPDFFont::kRelated_Match; | 1417 : SkPDFFont::kRelated_Match; |
1418 } | 1418 } |
1419 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match | 1419 return (existingGlyphID == searchGlyphID) ? SkPDFFont::kExact_Match |
1420 : SkPDFFont::kRelated_Match; | 1420 : SkPDFFont::kRelated_Match; |
1421 } | 1421 } |
OLD | NEW |