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 #ifndef SkPDFFont_DEFINED | 10 #ifndef SkPDFFont_DEFINED |
(...skipping 28 matching lines...) Expand all Loading... |
39 struct FontGlyphSetPair { | 39 struct FontGlyphSetPair { |
40 FontGlyphSetPair(SkPDFFont* font, SkPDFGlyphSet* glyphSet); | 40 FontGlyphSetPair(SkPDFFont* font, SkPDFGlyphSet* glyphSet); |
41 | 41 |
42 SkPDFFont* fFont; | 42 SkPDFFont* fFont; |
43 SkPDFGlyphSet* fGlyphSet; | 43 SkPDFGlyphSet* fGlyphSet; |
44 }; | 44 }; |
45 | 45 |
46 SkPDFGlyphSetMap(); | 46 SkPDFGlyphSetMap(); |
47 ~SkPDFGlyphSetMap(); | 47 ~SkPDFGlyphSetMap(); |
48 | 48 |
49 class F2BIter { | 49 const FontGlyphSetPair* begin() const { return fMap.begin(); } |
50 public: | 50 const FontGlyphSetPair* end() const { return fMap.end(); } |
51 explicit F2BIter(const SkPDFGlyphSetMap& map); | |
52 const FontGlyphSetPair* next() const; | |
53 void reset(const SkPDFGlyphSetMap& map); | |
54 | |
55 private: | |
56 const SkTDArray<FontGlyphSetPair>* fMap; | |
57 mutable int fIndex; | |
58 }; | |
59 | 51 |
60 void merge(const SkPDFGlyphSetMap& usage); | 52 void merge(const SkPDFGlyphSetMap& usage); |
61 void reset(); | 53 void reset(); |
62 | 54 |
63 void noteGlyphUsage(SkPDFFont* font, const uint16_t* glyphIDs, | 55 void noteGlyphUsage(SkPDFFont* font, const uint16_t* glyphIDs, |
64 int numGlyphs); | 56 int numGlyphs); |
65 | 57 |
66 private: | 58 private: |
67 SkPDFGlyphSet* getGlyphSetForFont(SkPDFFont* font); | 59 SkPDFGlyphSet* getGlyphSetForFont(SkPDFFont* font); |
68 | 60 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 uint16_t fLastGlyphID; | 196 uint16_t fLastGlyphID; |
205 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; | 197 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; |
206 sk_sp<SkPDFDict> fDescriptor; | 198 sk_sp<SkPDFDict> fDescriptor; |
207 | 199 |
208 SkAdvancedTypefaceMetrics::FontType fFontType; | 200 SkAdvancedTypefaceMetrics::FontType fFontType; |
209 | 201 |
210 typedef SkPDFDict INHERITED; | 202 typedef SkPDFDict INHERITED; |
211 }; | 203 }; |
212 | 204 |
213 #endif | 205 #endif |
OLD | NEW |