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

Side by Side Diff: src/ports/SkFontHost_FreeType_common.h

Issue 488143002: Replace SkTypeface::Style with SkFontStyle. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add expectations, remove whitespace. 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/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontHost_fontconfig.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-2012 The Android Open Source Project 2 * Copyright 2006-2012 The Android Open Source Project
3 * Copyright 2012 Mozilla Foundation 3 * Copyright 2012 Mozilla Foundation
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 #ifndef SKFONTHOST_FREETYPE_COMMON_H_ 9 #ifndef SKFONTHOST_FREETYPE_COMMON_H_
10 #define SKFONTHOST_FREETYPE_COMMON_H_ 10 #define SKFONTHOST_FREETYPE_COMMON_H_
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 private: 42 private:
43 typedef SkScalerContext INHERITED; 43 typedef SkScalerContext INHERITED;
44 }; 44 };
45 45
46 class SkTypeface_FreeType : public SkTypeface { 46 class SkTypeface_FreeType : public SkTypeface {
47 public: 47 public:
48 /** For SkFontMgrs to make use of our ability to extract 48 /** For SkFontMgrs to make use of our ability to extract
49 * name and style from a stream, using FreeType's API. 49 * name and style from a stream, using FreeType's API.
50 */ 50 */
51 static bool ScanFont(SkStream* stream, int ttcIndex, 51 static bool ScanFont(SkStream* stream, int ttcIndex,
52 SkString* name, SkTypeface::Style* style, bool* isFixed Pitch); 52 SkString* name, SkFontStyle* style, bool* isFixedPitch) ;
53 53
54 protected: 54 protected:
55 SkTypeface_FreeType(Style style, SkFontID uniqueID, bool isFixedPitch) 55 SkTypeface_FreeType(const SkFontStyle& style, SkFontID uniqueID, bool isFixe dPitch)
56 : INHERITED(style, uniqueID, isFixedPitch) 56 : INHERITED(style, uniqueID, isFixedPitch)
57 , fGlyphCount(-1) 57 , fGlyphCount(-1)
58 {} 58 {}
59 59
60 virtual SkScalerContext* onCreateScalerContext( 60 virtual SkScalerContext* onCreateScalerContext(
61 const SkDescriptor*) const SK_OVERRIDE; 61 const SkDescriptor*) const SK_OVERRIDE;
62 virtual void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE; 62 virtual void onFilterRec(SkScalerContextRec*) const SK_OVERRIDE;
63 virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics( 63 virtual SkAdvancedTypefaceMetrics* onGetAdvancedTypefaceMetrics(
64 SkAdvancedTypefaceMetrics::PerGlyphInfo, 64 SkAdvancedTypefaceMetrics::PerGlyphInfo,
65 const uint32_t*, uint32_t) const SK_OVERRIDE; 65 const uint32_t*, uint32_t) const SK_OVERRIDE;
(...skipping 10 matching lines...) Expand all
76 virtual size_t onGetTableData(SkFontTableTag, size_t offset, 76 virtual size_t onGetTableData(SkFontTableTag, size_t offset,
77 size_t length, void* data) const SK_OVERRIDE; 77 size_t length, void* data) const SK_OVERRIDE;
78 78
79 private: 79 private:
80 mutable int fGlyphCount; 80 mutable int fGlyphCount;
81 81
82 typedef SkTypeface INHERITED; 82 typedef SkTypeface INHERITED;
83 }; 83 };
84 84
85 #endif // SKFONTHOST_FREETYPE_COMMON_H_ 85 #endif // SKFONTHOST_FREETYPE_COMMON_H_
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698