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

Side by Side Diff: include/core/SkTypeface.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 | « gyp/core.gypi ('k') | src/core/SkAdvancedTypefaceMetrics.h » ('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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #ifndef SkTypeface_DEFINED 8 #ifndef SkTypeface_DEFINED
9 #define SkTypeface_DEFINED 9 #define SkTypeface_DEFINED
10 10
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 325 }
326 // PRIVATE / EXPERIMENTAL -- do not call 326 // PRIVATE / EXPERIMENTAL -- do not call
327 void getFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const { 327 void getFontDescriptor(SkFontDescriptor* desc, bool* isLocal) const {
328 this->onGetFontDescriptor(desc, isLocal); 328 this->onGetFontDescriptor(desc, isLocal);
329 } 329 }
330 330
331 protected: 331 protected:
332 // The type of advance data wanted. 332 // The type of advance data wanted.
333 enum PerGlyphInfo { 333 enum PerGlyphInfo {
334 kNo_PerGlyphInfo = 0x0, // Don't populate any per glyph info. 334 kNo_PerGlyphInfo = 0x0, // Don't populate any per glyph info.
335 kHAdvance_PerGlyphInfo = 0x1, // Populate horizontal advance data. 335 kGlyphNames_PerGlyphInfo = 0x1, // Populate glyph names (Type 1 only).
336 kVAdvance_PerGlyphInfo = 0x2, // Populate vertical advance data. 336 kToUnicode_PerGlyphInfo = 0x2 // Populate ToUnicode table, ignored
337 kGlyphNames_PerGlyphInfo = 0x4, // Populate glyph names (Type 1 only). 337 // for Type 1 fonts
338 kToUnicode_PerGlyphInfo = 0x8 // Populate ToUnicode table, ignored
339 // for Type 1 fonts
340 }; 338 };
341 339
342 /** uniqueID must be unique and non-zero 340 /** uniqueID must be unique and non-zero
343 */ 341 */
344 SkTypeface(const SkFontStyle& style, bool isFixedPitch = false); 342 SkTypeface(const SkFontStyle& style, bool isFixedPitch = false);
345 virtual ~SkTypeface(); 343 virtual ~SkTypeface();
346 344
347 /** Sets the fixedPitch bit. If used, must be called in the constructor. */ 345 /** Sets the fixedPitch bit. If used, must be called in the constructor. */
348 void setIsFixedPitch(bool isFixedPitch) { fIsFixedPitch = isFixedPitch; } 346 void setIsFixedPitch(bool isFixedPitch) { fIsFixedPitch = isFixedPitch; }
349 /** Sets the font style. If used, must be called in the constructor. */ 347 /** Sets the font style. If used, must be called in the constructor. */
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 mutable SkOnce fBoundsOnce; 416 mutable SkOnce fBoundsOnce;
419 bool fIsFixedPitch; 417 bool fIsFixedPitch;
420 418
421 friend class SkPaint; 419 friend class SkPaint;
422 friend class SkGlyphCache; // GetDefaultTypeface 420 friend class SkGlyphCache; // GetDefaultTypeface
423 421
424 typedef SkWeakRefCnt INHERITED; 422 typedef SkWeakRefCnt INHERITED;
425 }; 423 };
426 424
427 #endif 425 #endif
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkAdvancedTypefaceMetrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698