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

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

Issue 2222523003: SkPDF/SkAdvancedTypefaceMetrics: simplify ATM, PDF takes over (Closed) Base URL: https://skia.googlesource.com/skia.git@SkPDF_no_kHAdvance
Patch Set: rebase and nit Created 4 years, 4 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') | src/ports/SkFontHost_FreeType.cpp » ('j') | 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 * 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 SkPDFFontImpl_DEFINED 9 #ifndef SkPDFFontImpl_DEFINED
10 #define SkPDFFontImpl_DEFINED 10 #define SkPDFFontImpl_DEFINED
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 SkPDFCIDFont(const SkAdvancedTypefaceMetrics* info, 46 SkPDFCIDFont(const SkAdvancedTypefaceMetrics* info,
47 SkTypeface* typeface, 47 SkTypeface* typeface,
48 const SkPDFGlyphSet* subset); 48 const SkPDFGlyphSet* subset);
49 49
50 bool populate(const SkPDFGlyphSet* subset); 50 bool populate(const SkPDFGlyphSet* subset);
51 bool addFontDescriptor(int16_t defaultWidth, 51 bool addFontDescriptor(int16_t defaultWidth,
52 const SkTDArray<uint32_t>* subset); 52 const SkTDArray<uint32_t>* subset);
53 }; 53 };
54 54
55 struct AdvanceMetric;
56
55 class SkPDFType1Font final : public SkPDFFont { 57 class SkPDFType1Font final : public SkPDFFont {
56 public: 58 public:
57 virtual ~SkPDFType1Font(); 59 virtual ~SkPDFType1Font();
58 virtual bool multiByteGlyphs() const { return false; } 60 virtual bool multiByteGlyphs() const { return false; }
59 61
60 private: 62 private:
61 friend class SkPDFFont; // to access the constructor 63 friend class SkPDFFont; // to access the constructor
62 64
63 SkPDFType1Font(const SkAdvancedTypefaceMetrics* info, 65 SkPDFType1Font(const SkAdvancedTypefaceMetrics* info,
64 SkTypeface* typeface, 66 SkTypeface* typeface,
65 uint16_t glyphID, 67 uint16_t glyphID,
66 SkPDFDict* relatedFontDescriptor); 68 SkPDFDict* relatedFontDescriptor);
67 69
68 bool populate(int16_t glyphID); 70 bool populate(int16_t glyphID);
69 bool addFontDescriptor(int16_t defaultWidth); 71 bool addFontDescriptor(int16_t defaultWidth);
70 void addWidthInfoFromRange(int16_t defaultWidth, 72 void addWidthInfoFromRange(int16_t defaultWidth,
71 const SkAdvancedTypefaceMetrics::WidthRange* widthRangeEntry); 73 const AdvanceMetric* widthRangeEntry);
72 }; 74 };
73 75
74 class SkPDFType3Font final : public SkPDFFont { 76 class SkPDFType3Font final : public SkPDFFont {
75 public: 77 public:
76 virtual ~SkPDFType3Font(); 78 virtual ~SkPDFType3Font();
77 virtual bool multiByteGlyphs() const { return false; } 79 virtual bool multiByteGlyphs() const { return false; }
78 80
79 private: 81 private:
80 friend class SkPDFFont; // to access the constructor 82 friend class SkPDFFont; // to access the constructor
81 83
82 SkPDFType3Font(const SkAdvancedTypefaceMetrics* info, 84 SkPDFType3Font(const SkAdvancedTypefaceMetrics* info,
83 SkTypeface* typeface, 85 SkTypeface* typeface,
84 uint16_t glyphID); 86 uint16_t glyphID);
85 87
86 bool populate(uint16_t glyphID); 88 bool populate(uint16_t glyphID);
87 }; 89 };
88 90
89 #endif 91 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/ports/SkFontHost_FreeType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698