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/SkPDFFont.h

Issue 2330503002: work in progress (Closed)
Patch Set: Created 4 years, 3 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/SkPDFDevice.cpp ('k') | src/pdf/SkPDFFont.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 SkPDFFont_DEFINED 9 #ifndef SkPDFFont_DEFINED
10 #define SkPDFFont_DEFINED 10 #define SkPDFFont_DEFINED
(...skipping 22 matching lines...) Expand all
33 /** Returns the typeface represented by this class. Returns nullptr for the 33 /** Returns the typeface represented by this class. Returns nullptr for the
34 * default typeface. 34 * default typeface.
35 */ 35 */
36 SkTypeface* typeface() const { return fTypeface.get(); } 36 SkTypeface* typeface() const { return fTypeface.get(); }
37 37
38 /** Returns the font type represented in this font. For Type0 fonts, 38 /** Returns the font type represented in this font. For Type0 fonts,
39 * returns the type of the decendant font. 39 * returns the type of the decendant font.
40 */ 40 */
41 SkAdvancedTypefaceMetrics::FontType getType() const { return fFontType; } 41 SkAdvancedTypefaceMetrics::FontType getType() const { return fFontType; }
42 42
43 static SkAdvancedTypefaceMetrics::FontType FontType(const SkAdvancedTypeface Metrics&);
44
43 static bool IsMultiByte(SkAdvancedTypefaceMetrics::FontType type) { 45 static bool IsMultiByte(SkAdvancedTypefaceMetrics::FontType type) {
44 return type == SkAdvancedTypefaceMetrics::kType1CID_Font || 46 return type == SkAdvancedTypefaceMetrics::kType1CID_Font ||
45 type == SkAdvancedTypefaceMetrics::kTrueType_Font; 47 type == SkAdvancedTypefaceMetrics::kTrueType_Font;
46 } 48 }
47 49
48 /** Returns true if this font encoding supports glyph IDs above 255. 50 /** Returns true if this font encoding supports glyph IDs above 255.
49 */ 51 */
50 bool multiByteGlyphs() const { return SkPDFFont::IsMultiByte(this->getType() ); } 52 bool multiByteGlyphs() const { return SkPDFFont::IsMultiByte(this->getType() ); }
51 53
52 /** Return true if this font has an encoding for the passed glyph id. 54 /** Return true if this font has an encoding for the passed glyph id.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // The glyph IDs accessible with this font. For Type1 (non CID) fonts, 145 // The glyph IDs accessible with this font. For Type1 (non CID) fonts,
144 // this will be a subset if the font has more than 255 glyphs. 146 // this will be a subset if the font has more than 255 glyphs.
145 const SkGlyphID fFirstGlyphID; 147 const SkGlyphID fFirstGlyphID;
146 const SkGlyphID fLastGlyphID; 148 const SkGlyphID fLastGlyphID;
147 const SkAdvancedTypefaceMetrics::FontType fFontType; 149 const SkAdvancedTypefaceMetrics::FontType fFontType;
148 150
149 typedef SkPDFDict INHERITED; 151 typedef SkPDFDict INHERITED;
150 }; 152 };
151 153
152 #endif 154 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698