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

Side by Side Diff: include/core/SkTypeface.h

Issue 2171163002: Add test for typeface style round trip. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Name extremes, add comment. 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 | « include/core/SkFontStyle.h ('k') | src/core/SkFontStyle.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 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 // for Type 1 fonts 339 // for Type 1 fonts
340 }; 340 };
341 341
342 /** uniqueID must be unique and non-zero 342 /** uniqueID must be unique and non-zero
343 */ 343 */
344 SkTypeface(const SkFontStyle& style, bool isFixedPitch = false); 344 SkTypeface(const SkFontStyle& style, bool isFixedPitch = false);
345 virtual ~SkTypeface(); 345 virtual ~SkTypeface();
346 346
347 /** Sets the fixedPitch bit. If used, must be called in the constructor. */ 347 /** Sets the fixedPitch bit. If used, must be called in the constructor. */
348 void setIsFixedPitch(bool isFixedPitch) { fIsFixedPitch = isFixedPitch; } 348 void setIsFixedPitch(bool isFixedPitch) { fIsFixedPitch = isFixedPitch; }
349 /** Sets the font style. If used, must be called in the constructor. */
350 void setFontStyle(SkFontStyle style) { fStyle = style; }
349 351
350 friend class SkScalerContext; 352 friend class SkScalerContext;
351 static SkTypeface* GetDefaultTypeface(Style style = SkTypeface::kNormal); 353 static SkTypeface* GetDefaultTypeface(Style style = SkTypeface::kNormal);
352 354
353 virtual SkScalerContext* onCreateScalerContext(const SkScalerContextEffects& , 355 virtual SkScalerContext* onCreateScalerContext(const SkScalerContextEffects& ,
354 const SkDescriptor*) const = 0; 356 const SkDescriptor*) const = 0;
355 virtual void onFilterRec(SkScalerContextRec*) const = 0; 357 virtual void onFilterRec(SkScalerContextRec*) const = 0;
356 virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( 358 virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics(
357 PerGlyphInfo, 359 PerGlyphInfo,
358 const uint32_t* glyphIDs, 360 const uint32_t* glyphIDs,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 mutable SkOnce fBoundsOnce; 418 mutable SkOnce fBoundsOnce;
417 bool fIsFixedPitch; 419 bool fIsFixedPitch;
418 420
419 friend class SkPaint; 421 friend class SkPaint;
420 friend class SkGlyphCache; // GetDefaultTypeface 422 friend class SkGlyphCache; // GetDefaultTypeface
421 423
422 typedef SkWeakRefCnt INHERITED; 424 typedef SkWeakRefCnt INHERITED;
423 }; 425 };
424 426
425 #endif 427 #endif
OLDNEW
« no previous file with comments | « include/core/SkFontStyle.h ('k') | src/core/SkFontStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698