Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: src/pdf/SkPDFFontImpl.h

Issue 383063007: Make SkPDFFont::fFontInfo a const pointer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 SkPDFFontImpl_DEFINED 10 #ifndef SkPDFFontImpl_DEFINED
(...skipping 11 matching lines...) Expand all
22 bool indirect); 22 bool indirect);
23 #endif 23 #endif
24 24
25 private: 25 private:
26 friend class SkPDFFont; // to access the constructor 26 friend class SkPDFFont; // to access the constructor
27 #ifdef SK_DEBUG 27 #ifdef SK_DEBUG
28 bool fPopulated; 28 bool fPopulated;
29 typedef SkPDFDict INHERITED; 29 typedef SkPDFDict INHERITED;
30 #endif 30 #endif
31 31
32 SkPDFType0Font(SkAdvancedTypefaceMetrics* info, SkTypeface* typeface); 32 SkPDFType0Font(const SkAdvancedTypefaceMetrics* info, SkTypeface* typeface);
33 33
34 bool populate(const SkPDFGlyphSet* subset); 34 bool populate(const SkPDFGlyphSet* subset);
35 }; 35 };
36 36
37 class SkPDFCIDFont : public SkPDFFont { 37 class SkPDFCIDFont : public SkPDFFont {
38 public: 38 public:
39 virtual ~SkPDFCIDFont(); 39 virtual ~SkPDFCIDFont();
40 virtual bool multiByteGlyphs() const { return true; } 40 virtual bool multiByteGlyphs() const { return true; }
41 41
42 private: 42 private:
43 friend class SkPDFType0Font; // to access the constructor 43 friend class SkPDFType0Font; // to access the constructor
44 44
45 SkPDFCIDFont(SkAdvancedTypefaceMetrics* info, SkTypeface* typeface, 45 SkPDFCIDFont(const SkAdvancedTypefaceMetrics* info, SkTypeface* typeface,
46 const SkPDFGlyphSet* subset); 46 const SkPDFGlyphSet* subset);
47 47
48 bool populate(const SkPDFGlyphSet* subset); 48 bool populate(const SkPDFGlyphSet* subset);
49 bool addFontDescriptor(int16_t defaultWidth, 49 bool addFontDescriptor(int16_t defaultWidth,
50 const SkTDArray<uint32_t>* subset); 50 const SkTDArray<uint32_t>* subset);
51 }; 51 };
52 52
53 class SkPDFType1Font : public SkPDFFont { 53 class SkPDFType1Font : public SkPDFFont {
54 public: 54 public:
55 virtual ~SkPDFType1Font(); 55 virtual ~SkPDFType1Font();
56 virtual bool multiByteGlyphs() const { return false; } 56 virtual bool multiByteGlyphs() const { return false; }
57 57
58 private: 58 private:
59 friend class SkPDFFont; // to access the constructor 59 friend class SkPDFFont; // to access the constructor
60 60
61 SkPDFType1Font(SkAdvancedTypefaceMetrics* info, SkTypeface* typeface, 61 SkPDFType1Font(const SkAdvancedTypefaceMetrics* info, SkTypeface* typeface,
62 uint16_t glyphID, SkPDFDict* relatedFontDescriptor); 62 uint16_t glyphID, SkPDFDict* relatedFontDescriptor);
63 63
64 bool populate(int16_t glyphID); 64 bool populate(int16_t glyphID);
65 bool addFontDescriptor(int16_t defaultWidth); 65 bool addFontDescriptor(int16_t defaultWidth);
66 void addWidthInfoFromRange(int16_t defaultWidth, 66 void addWidthInfoFromRange(int16_t defaultWidth,
67 const SkAdvancedTypefaceMetrics::WidthRange* widthRangeEntry); 67 const SkAdvancedTypefaceMetrics::WidthRange* widthRangeEntry);
68 }; 68 };
69 69
70 class SkPDFType3Font : public SkPDFFont { 70 class SkPDFType3Font : public SkPDFFont {
71 public: 71 public:
72 virtual ~SkPDFType3Font(); 72 virtual ~SkPDFType3Font();
73 virtual bool multiByteGlyphs() const { return false; } 73 virtual bool multiByteGlyphs() const { return false; }
74 74
75 private: 75 private:
76 friend class SkPDFFont; // to access the constructor 76 friend class SkPDFFont; // to access the constructor
77 77
78 SkPDFType3Font(SkAdvancedTypefaceMetrics* info, SkTypeface* typeface, uint16 _t glyphID); 78 SkPDFType3Font(const SkAdvancedTypefaceMetrics* info,
79 SkTypeface* typeface, uint16_t glyphID);
79 80
80 bool populate(int16_t glyphID); 81 bool populate(int16_t glyphID);
81 }; 82 };
82 83
83 #endif 84 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698