OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include <ctype.h> | 10 #include <ctype.h> |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 SkPDFGlyphSetMap::FontGlyphSetPair::FontGlyphSetPair(SkPDFFont* font, | 617 SkPDFGlyphSetMap::FontGlyphSetPair::FontGlyphSetPair(SkPDFFont* font, |
618 SkPDFGlyphSet* glyphSet) | 618 SkPDFGlyphSet* glyphSet) |
619 : fFont(font), | 619 : fFont(font), |
620 fGlyphSet(glyphSet) { | 620 fGlyphSet(glyphSet) { |
621 } | 621 } |
622 | 622 |
623 SkPDFGlyphSetMap::F2BIter::F2BIter(const SkPDFGlyphSetMap& map) { | 623 SkPDFGlyphSetMap::F2BIter::F2BIter(const SkPDFGlyphSetMap& map) { |
624 reset(map); | 624 reset(map); |
625 } | 625 } |
626 | 626 |
627 SkPDFGlyphSetMap::FontGlyphSetPair* SkPDFGlyphSetMap::F2BIter::next() const { | 627 const SkPDFGlyphSetMap::FontGlyphSetPair* SkPDFGlyphSetMap::F2BIter::next() cons
t { |
628 if (fIndex >= fMap->count()) { | 628 if (fIndex >= fMap->count()) { |
629 return NULL; | 629 return NULL; |
630 } | 630 } |
631 return &((*fMap)[fIndex++]); | 631 return &((*fMap)[fIndex++]); |
632 } | 632 } |
633 | 633 |
634 void SkPDFGlyphSetMap::F2BIter::reset(const SkPDFGlyphSetMap& map) { | 634 void SkPDFGlyphSetMap::F2BIter::reset(const SkPDFGlyphSetMap& map) { |
635 fMap = &(map.fMap); | 635 fMap = &(map.fMap); |
636 fIndex = 0; | 636 fIndex = 0; |
637 } | 637 } |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 | 1402 |
1403 insert("FontBBox", makeFontBBox(bbox, 1000))->unref(); | 1403 insert("FontBBox", makeFontBBox(bbox, 1000))->unref(); |
1404 insertInt("FirstChar", firstGlyphID()); | 1404 insertInt("FirstChar", firstGlyphID()); |
1405 insertInt("LastChar", lastGlyphID()); | 1405 insertInt("LastChar", lastGlyphID()); |
1406 insert("Widths", widthArray.get()); | 1406 insert("Widths", widthArray.get()); |
1407 insertName("CIDToGIDMap", "Identity"); | 1407 insertName("CIDToGIDMap", "Identity"); |
1408 | 1408 |
1409 populateToUnicodeTable(NULL); | 1409 populateToUnicodeTable(NULL); |
1410 return true; | 1410 return true; |
1411 } | 1411 } |
OLD | NEW |