| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 | 72 |
| 73 /** \class SkPDFFont | 73 /** \class SkPDFFont |
| 74 A PDF Object class representing a font. The font may have resources | 74 A PDF Object class representing a font. The font may have resources |
| 75 attached to it in order to embed the font. SkPDFFonts are canonicalized | 75 attached to it in order to embed the font. SkPDFFonts are canonicalized |
| 76 so that resource deduplication will only include one copy of a font. | 76 so that resource deduplication will only include one copy of a font. |
| 77 This class uses the same pattern as SkPDFGraphicState, a static weak | 77 This class uses the same pattern as SkPDFGraphicState, a static weak |
| 78 reference to each instantiated class. | 78 reference to each instantiated class. |
| 79 */ | 79 */ |
| 80 class SkPDFFont : public SkPDFDict { | 80 class SkPDFFont : public SkPDFDict { |
| 81 SK_DECLARE_INST_COUNT(SkPDFFont) |
| 81 public: | 82 public: |
| 82 virtual ~SkPDFFont(); | 83 virtual ~SkPDFFont(); |
| 83 | 84 |
| 84 virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects, | 85 virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects, |
| 85 SkTSet<SkPDFObject*>* newResourceObjects); | 86 SkTSet<SkPDFObject*>* newResourceObjects); |
| 86 | 87 |
| 87 /** Returns the typeface represented by this class. Returns NULL for the | 88 /** Returns the typeface represented by this class. Returns NULL for the |
| 88 * default typeface. | 89 * default typeface. |
| 89 */ | 90 */ |
| 90 SkTypeface* typeface(); | 91 SkTypeface* typeface(); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 // Type1 (non CID) fonts that need multiple "fonts" to access all glyphs. | 192 // Type1 (non CID) fonts that need multiple "fonts" to access all glyphs. |
| 192 SkAutoTUnref<SkAdvancedTypefaceMetrics> fFontInfo; | 193 SkAutoTUnref<SkAdvancedTypefaceMetrics> fFontInfo; |
| 193 SkTDArray<SkPDFObject*> fResources; | 194 SkTDArray<SkPDFObject*> fResources; |
| 194 SkAutoTUnref<SkPDFDict> fDescriptor; | 195 SkAutoTUnref<SkPDFDict> fDescriptor; |
| 195 | 196 |
| 196 SkAdvancedTypefaceMetrics::FontType fFontType; | 197 SkAdvancedTypefaceMetrics::FontType fFontType; |
| 197 | 198 |
| 198 // This should be made a hash table if performance is a problem. | 199 // This should be made a hash table if performance is a problem. |
| 199 static SkTDArray<FontRec>& CanonicalFonts(); | 200 static SkTDArray<FontRec>& CanonicalFonts(); |
| 200 static SkBaseMutex& CanonicalFontsMutex(); | 201 static SkBaseMutex& CanonicalFontsMutex(); |
| 202 typedef SkPDFDict INHERITED; |
| 201 }; | 203 }; |
| 202 | 204 |
| 203 #endif | 205 #endif |
| OLD | NEW |