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

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

Issue 2095263003: typedef uint16_t SkGlyphID (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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 | « no previous file | include/core/SkPaint.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 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 SkFont_DEFINED 8 #ifndef SkFont_DEFINED
9 #define SkFont_DEFINED 9 #define SkFont_DEFINED
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 MaskType getMaskType() const { return (MaskType)fMaskType; } 139 MaskType getMaskType() const { return (MaskType)fMaskType; }
140 140
141 bool isVertical() const { return SkToBool(fFlags & kVertical_Flag); } 141 bool isVertical() const { return SkToBool(fFlags & kVertical_Flag); }
142 bool isEmbolden() const { return SkToBool(fFlags & kEmbolden_Flag); } 142 bool isEmbolden() const { return SkToBool(fFlags & kEmbolden_Flag); }
143 bool isEnableAutoHints() const { return SkToBool(fFlags & kEnableAutoHints_F lag); } 143 bool isEnableAutoHints() const { return SkToBool(fFlags & kEnableAutoHints_F lag); }
144 bool isEnableByteCodeHints() const { return SkToBool(fFlags & kEnableByteCod eHints_Flag); } 144 bool isEnableByteCodeHints() const { return SkToBool(fFlags & kEnableByteCod eHints_Flag); }
145 bool isUseNonLinearMetrics() const { return SkToBool(fFlags & kUseNonlinearM etrics_Flag); } 145 bool isUseNonLinearMetrics() const { return SkToBool(fFlags & kUseNonlinearM etrics_Flag); }
146 bool isDevKern() const { return SkToBool(fFlags & kDevKern_Flag); } 146 bool isDevKern() const { return SkToBool(fFlags & kDevKern_Flag); }
147 147
148 int textToGlyphs(const void* text, size_t byteLength, SkTextEncoding, 148 int textToGlyphs(const void* text, size_t byteLength, SkTextEncoding,
149 uint16_t glyphs[], int maxGlyphCount) const; 149 SkGlyphID glyphs[], int maxGlyphCount) const;
150 150
151 int countText(const void* text, size_t byteLength, SkTextEncoding encoding) { 151 int countText(const void* text, size_t byteLength, SkTextEncoding encoding) {
152 return this->textToGlyphs(text, byteLength, encoding, nullptr, 0); 152 return this->textToGlyphs(text, byteLength, encoding, nullptr, 0);
153 } 153 }
154 154
155 SkScalar measureText(const void* text, size_t byteLength, SkTextEncoding) co nst; 155 SkScalar measureText(const void* text, size_t byteLength, SkTextEncoding) co nst;
156 156
157 static sk_sp<SkFont> Testing_CreateFromPaint(const SkPaint&); 157 static sk_sp<SkFont> Testing_CreateFromPaint(const SkPaint&);
158 158
159 private: 159 private:
160 enum { 160 enum {
161 kAllFlags = 0xFF, 161 kAllFlags = 0xFF,
162 }; 162 };
163 163
164 SkFont(sk_sp<SkTypeface>, SkScalar size, SkScalar scaleX, SkScalar skewX, Ma skType, 164 SkFont(sk_sp<SkTypeface>, SkScalar size, SkScalar scaleX, SkScalar skewX, Ma skType,
165 uint32_t flags); 165 uint32_t flags);
166 166
167 sk_sp<SkTypeface> fTypeface; 167 sk_sp<SkTypeface> fTypeface;
168 SkScalar fSize; 168 SkScalar fSize;
169 SkScalar fScaleX; 169 SkScalar fScaleX;
170 SkScalar fSkewX; 170 SkScalar fSkewX;
171 uint16_t fFlags; 171 uint16_t fFlags;
172 uint8_t fMaskType; 172 uint8_t fMaskType;
173 // uint8_t fPad; 173 // uint8_t fPad;
174 }; 174 };
175 175
176 #endif 176 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkPaint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698