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

Side by Side Diff: src/fonts/SkTestScalerContext.h

Issue 1818043002: SkTypeface::MakeFromName to take SkFontStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Android fix + nit fix Created 4 years, 6 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/core/SkTypeface.cpp ('k') | src/utils/SkLua.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 2014 Google Inc. 2 * Copyright 2014 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 #ifndef SkTestScalerContext_DEFINED 8 #ifndef SkTestScalerContext_DEFINED
9 #define SkTestScalerContext_DEFINED 9 #define SkTestScalerContext_DEFINED
10 10
(...skipping 23 matching lines...) Expand all
34 34
35 35
36 SkTestFont(const SkTestFontData& ); 36 SkTestFont(const SkTestFontData& );
37 virtual ~SkTestFont(); 37 virtual ~SkTestFont();
38 int codeToIndex(SkUnichar charCode) const; 38 int codeToIndex(SkUnichar charCode) const;
39 void init(const SkScalar* pts, const unsigned char* verbs); 39 void init(const SkScalar* pts, const unsigned char* verbs);
40 #ifdef SK_DEBUG // detect missing test font data 40 #ifdef SK_DEBUG // detect missing test font data
41 mutable unsigned char fDebugBits[16]; 41 mutable unsigned char fDebugBits[16];
42 mutable SkUnichar fDebugOverage[8]; 42 mutable SkUnichar fDebugOverage[8];
43 const char* fDebugName; 43 const char* fDebugName;
44 SkTypeface::Style fDebugStyle; 44 SkFontStyle fDebugStyle;
45 const char* debugFontName() const { return fName; } 45 const char* debugFontName() const { return fName; }
46 #endif 46 #endif
47 private: 47 private:
48 const unsigned* fCharCodes; 48 const unsigned* fCharCodes;
49 const size_t fCharCodesCount; 49 const size_t fCharCodesCount;
50 const SkFixed* fWidths; 50 const SkFixed* fWidths;
51 const SkPaint::FontMetrics& fMetrics; 51 const SkPaint::FontMetrics& fMetrics;
52 const char* fName; 52 const char* fName;
53 SkPath** fPaths; 53 SkPath** fPaths;
54 friend class SkTestTypeface; 54 friend class SkTestTypeface;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return 0; 105 return 0;
106 } 106 }
107 private: 107 private:
108 SkTestFont* fTestFont; 108 SkTestFont* fTestFont;
109 friend class SkTestScalerContext; 109 friend class SkTestScalerContext;
110 }; 110 };
111 111
112 SkTypeface* CreateTestTypeface(const char* name, SkTypeface::Style style); 112 SkTypeface* CreateTestTypeface(const char* name, SkTypeface::Style style);
113 113
114 #endif 114 #endif
OLDNEW
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698