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

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

Issue 626613002: Fix int16_t for glyphs, const glyphs, and clarify glyph loop. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment. Created 6 years, 2 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 /* 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // Accessors for FontDescriptor associated with this object. 157 // Accessors for FontDescriptor associated with this object.
158 SkPDFDict* getFontDescriptor(); 158 SkPDFDict* getFontDescriptor();
159 void setFontDescriptor(SkPDFDict* descriptor); 159 void setFontDescriptor(SkPDFDict* descriptor);
160 160
161 // Add common entries to FontDescriptor. 161 // Add common entries to FontDescriptor.
162 bool addCommonFontDescriptorEntries(int16_t defaultWidth); 162 bool addCommonFontDescriptorEntries(int16_t defaultWidth);
163 163
164 /** Set fFirstGlyphID and fLastGlyphID to span at most 255 glyphs, 164 /** Set fFirstGlyphID and fLastGlyphID to span at most 255 glyphs,
165 * including the passed glyphID. 165 * including the passed glyphID.
166 */ 166 */
167 void adjustGlyphRangeForSingleByteEncoding(int16_t glyphID); 167 void adjustGlyphRangeForSingleByteEncoding(uint16_t glyphID);
168 168
169 // Generate ToUnicode table according to glyph usage subset. 169 // Generate ToUnicode table according to glyph usage subset.
170 // If subset is NULL, all available glyph ids will be used. 170 // If subset is NULL, all available glyph ids will be used.
171 void populateToUnicodeTable(const SkPDFGlyphSet* subset); 171 void populateToUnicodeTable(const SkPDFGlyphSet* subset);
172 172
173 // Create instances of derived types based on fontInfo. 173 // Create instances of derived types based on fontInfo.
174 static SkPDFFont* Create(const SkAdvancedTypefaceMetrics* fontInfo, 174 static SkPDFFont* Create(const SkAdvancedTypefaceMetrics* fontInfo,
175 SkTypeface* typeface, uint16_t glyphID, 175 SkTypeface* typeface, uint16_t glyphID,
176 SkPDFDict* relatedFontDescriptor); 176 SkPDFDict* relatedFontDescriptor);
177 177
(...skipping 23 matching lines...) Expand all
201 201
202 SkAdvancedTypefaceMetrics::FontType fFontType; 202 SkAdvancedTypefaceMetrics::FontType fFontType;
203 203
204 // This should be made a hash table if performance is a problem. 204 // This should be made a hash table if performance is a problem.
205 static SkTDArray<FontRec>& CanonicalFonts(); 205 static SkTDArray<FontRec>& CanonicalFonts();
206 static SkBaseMutex& CanonicalFontsMutex(); 206 static SkBaseMutex& CanonicalFontsMutex();
207 typedef SkPDFDict INHERITED; 207 typedef SkPDFDict INHERITED;
208 }; 208 };
209 209
210 #endif 210 #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