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

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

Issue 434623002: Remove ALL font fallback logic from Skia. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix win font host Created 6 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/SkPaint.h ('k') | include/ports/SkTypeface_android.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 /* 2 /*
3 * Copyright 2012 The Android Open Source Project 3 * Copyright 2012 The Android Open Source Project
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 SkPaintOptionsAndroid_DEFINED 10 #ifndef SkPaintOptionsAndroid_DEFINED
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 private: 54 private:
55 //! BCP 47 language identifier 55 //! BCP 47 language identifier
56 SkString fTag; 56 SkString fTag;
57 }; 57 };
58 58
59 class SkPaintOptionsAndroid { 59 class SkPaintOptionsAndroid {
60 public: 60 public:
61 SkPaintOptionsAndroid() { 61 SkPaintOptionsAndroid() {
62 fFontVariant = kDefault_Variant; 62 fFontVariant = kDefault_Variant;
63 fUseFontFallbacks = false;
64 } 63 }
65 64
66 SkPaintOptionsAndroid& operator=(const SkPaintOptionsAndroid& b) { 65 SkPaintOptionsAndroid& operator=(const SkPaintOptionsAndroid& b) {
67 fLanguage = b.fLanguage; 66 fLanguage = b.fLanguage;
68 fFontVariant = b.fFontVariant; 67 fFontVariant = b.fFontVariant;
69 fUseFontFallbacks = b.fUseFontFallbacks;
70 return *this; 68 return *this;
71 } 69 }
72 70
73 bool operator==(const SkPaintOptionsAndroid& b) const { 71 bool operator==(const SkPaintOptionsAndroid& b) const {
74 return !(*this != b); 72 return !(*this != b);
75 } 73 }
76 74
77 bool operator!=(const SkPaintOptionsAndroid& b) const { 75 bool operator!=(const SkPaintOptionsAndroid& b) const {
78 return fLanguage != b.fLanguage || 76 return fLanguage != b.fLanguage ||
79 fFontVariant != b.fFontVariant || 77 fFontVariant != b.fFontVariant;
80 fUseFontFallbacks != b.fUseFontFallbacks;
81 } 78 }
82 79
83 void flatten(SkWriteBuffer&) const; 80 void flatten(SkWriteBuffer&) const;
84 void unflatten(SkReadBuffer&); 81 void unflatten(SkReadBuffer&);
85 82
86 /** Return the paint's language value used for drawing text. 83 /** Return the paint's language value used for drawing text.
87 @return the paint's language value used for drawing text. 84 @return the paint's language value used for drawing text.
88 */ 85 */
89 const SkLanguage& getLanguage() const { return fLanguage; } 86 const SkLanguage& getLanguage() const { return fLanguage; }
90 87
(...skipping 17 matching lines...) Expand all
108 FontVariant getFontVariant() const { return fFontVariant; } 105 FontVariant getFontVariant() const { return fFontVariant; }
109 106
110 /** Set the font variant 107 /** Set the font variant
111 @param fontVariant set the paint's font variant for choosing fonts 108 @param fontVariant set the paint's font variant for choosing fonts
112 */ 109 */
113 void setFontVariant(FontVariant fontVariant) { 110 void setFontVariant(FontVariant fontVariant) {
114 SkASSERT((unsigned)fontVariant <= kLast_Variant); 111 SkASSERT((unsigned)fontVariant <= kLast_Variant);
115 fFontVariant = fontVariant; 112 fFontVariant = fontVariant;
116 } 113 }
117 114
118 bool isUsingFontFallbacks() const { return fUseFontFallbacks; }
119
120 void setUseFontFallbacks(bool useFontFallbacks) {
121 fUseFontFallbacks = useFontFallbacks;
122 }
123
124 private: 115 private:
125 SkLanguage fLanguage; 116 SkLanguage fLanguage;
126 FontVariant fFontVariant; 117 FontVariant fFontVariant;
127 bool fUseFontFallbacks;
128 }; 118 };
129 119
130 #endif // #ifndef SkPaintOptionsAndroid_DEFINED 120 #endif // #ifndef SkPaintOptionsAndroid_DEFINED
OLDNEW
« no previous file with comments | « include/core/SkPaint.h ('k') | include/ports/SkTypeface_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698