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 | 8 |
9 #ifndef SkPDFFont_DEFINED | 9 #ifndef SkPDFFont_DEFINED |
10 #define SkPDFFont_DEFINED | 10 #define SkPDFFont_DEFINED |
11 | 11 |
12 #include "SkAdvancedTypefaceMetrics.h" | 12 #include "SkAdvancedTypefaceMetrics.h" |
13 #include "SkBitSet.h" | 13 #include "SkBitSet.h" |
14 #include "SkPDFTypes.h" | 14 #include "SkPDFTypes.h" |
15 #include "SkTDArray.h" | 15 #include "SkTDArray.h" |
16 #include "SkTypeface.h" | 16 #include "SkTypeface.h" |
17 | 17 |
18 class SkPDFCanon; | 18 class SkPDFCanon; |
19 class SkPDFFont; | 19 class SkPDFFont; |
20 | 20 |
21 class SkPDFGlyphSet : SkNoncopyable { | 21 class SkPDFGlyphSet : SkNoncopyable { |
22 public: | 22 public: |
23 SkPDFGlyphSet(); | 23 SkPDFGlyphSet(); |
24 SkPDFGlyphSet(SkPDFGlyphSet&& o) : fBitSet(std::move(o.fBitSet)) {} | 24 SkPDFGlyphSet(SkPDFGlyphSet&& o) : fBitSet(std::move(o.fBitSet)) {} |
25 | 25 |
26 void set(const uint16_t* glyphIDs, int numGlyphs); | 26 void set(const uint16_t* glyphIDs, int numGlyphs); |
27 bool has(uint16_t glyphID) const; | 27 bool has(uint16_t glyphID) const; |
28 void exportTo(SkTDArray<uint32_t>* glyphIDs) const; | 28 void exportTo(SkTDArray<uint32_t>* glyphIDs) const; |
| 29 const SkBitSet& bitSet() const { return fBitSet; } |
29 | 30 |
30 private: | 31 private: |
31 SkBitSet fBitSet; | 32 SkBitSet fBitSet; |
32 }; | 33 }; |
33 | 34 |
34 class SkPDFGlyphSetMap : SkNoncopyable { | 35 class SkPDFGlyphSetMap : SkNoncopyable { |
35 public: | 36 public: |
36 struct FontGlyphSetPair : SkNoncopyable { | 37 struct FontGlyphSetPair : SkNoncopyable { |
37 FontGlyphSetPair() : fFont(nullptr) {} | 38 FontGlyphSetPair() : fFont(nullptr) {} |
38 FontGlyphSetPair(FontGlyphSetPair&& o) | 39 FontGlyphSetPair(FontGlyphSetPair&& o) |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // this will be a subset if the font has more than 255 glyphs. | 200 // this will be a subset if the font has more than 255 glyphs. |
200 SkGlyphID fFirstGlyphID; | 201 SkGlyphID fFirstGlyphID; |
201 SkGlyphID fLastGlyphID; | 202 SkGlyphID fLastGlyphID; |
202 SkAdvancedTypefaceMetrics::FontType fFontType; | 203 SkAdvancedTypefaceMetrics::FontType fFontType; |
203 bool fMultiByteGlyphs; | 204 bool fMultiByteGlyphs; |
204 | 205 |
205 typedef SkPDFDict INHERITED; | 206 typedef SkPDFDict INHERITED; |
206 }; | 207 }; |
207 | 208 |
208 #endif | 209 #endif |
OLD | NEW |