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

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

Issue 2231483002: SkPDF: Subset Type3 (fallback) font (Closed) Base URL: https://skia.googlesource.com/skia.git@SkPDF_next3
Patch Set: 2016-08-12 (Friday) 10:20:16 EDT 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/SkPDFDocument.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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 static sk_sp<const SkAdvancedTypefaceMetrics> GetFontMetricsWithToUnicode( 126 static sk_sp<const SkAdvancedTypefaceMetrics> GetFontMetricsWithToUnicode(
127 SkTypeface*, uint32_t* glyphs, uint32_t glyphsCount); 127 SkTypeface*, uint32_t* glyphs, uint32_t glyphsCount);
128 128
129 /** Subset the font based on usage set. Returns a SkPDFFont instance with 129 /** Subset the font based on usage set. Returns a SkPDFFont instance with
130 * subset. 130 * subset.
131 * @param usage Glyph subset requested. 131 * @param usage Glyph subset requested.
132 * @return nullptr if font does not support subsetting, a new instanc e 132 * @return nullptr if font does not support subsetting, a new instanc e
133 * of SkPDFFont otherwise. 133 * of SkPDFFont otherwise.
134 */ 134 */
135 virtual SkPDFFont* getFontSubset(const SkPDFGlyphSet* usage); 135 virtual sk_sp<SkPDFObject> getFontSubset(const SkPDFGlyphSet* usage);
136 136
137 enum Match { 137 enum Match {
138 kExact_Match, 138 kExact_Match,
139 kRelated_Match, 139 kRelated_Match,
140 kNot_Match, 140 kNot_Match,
141 }; 141 };
142 static Match IsMatch(SkPDFFont* existingFont, 142 static Match IsMatch(SkPDFFont* existingFont,
143 uint32_t existingFontID, 143 uint32_t existingFontID,
144 uint16_t existingGlyphID, 144 uint16_t existingGlyphID,
145 uint32_t searchFontID, 145 uint32_t searchFontID,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 uint16_t fLastGlyphID; 200 uint16_t fLastGlyphID;
201 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; 201 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo;
202 sk_sp<SkPDFDict> fDescriptor; 202 sk_sp<SkPDFDict> fDescriptor;
203 203
204 SkAdvancedTypefaceMetrics::FontType fFontType; 204 SkAdvancedTypefaceMetrics::FontType fFontType;
205 205
206 typedef SkPDFDict INHERITED; 206 typedef SkPDFDict INHERITED;
207 }; 207 };
208 208
209 #endif 209 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDocument.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698