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

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

Issue 12706010: Add SkTypeface* parameter to SkScalerContext (and its callers) (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « trunk/include/core/SkPaint.h ('k') | trunk/src/core/SkGlyphCache.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 2006 The Android Open Source Project 3 * Copyright 2006 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 SkTypeface_DEFINED 10 #ifndef SkTypeface_DEFINED
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 size_t getTableData(SkFontTableTag tag, size_t offset, size_t length, 187 size_t getTableData(SkFontTableTag tag, size_t offset, size_t length,
188 void* data) const; 188 void* data) const;
189 189
190 /** 190 /**
191 * Return the units-per-em value for this typeface, or zero if there is an 191 * Return the units-per-em value for this typeface, or zero if there is an
192 * error. 192 * error.
193 */ 193 */
194 int getUnitsPerEm() const; 194 int getUnitsPerEm() const;
195 195
196 SkStream* openStream(int* ttcIndex) const; 196 SkStream* openStream(int* ttcIndex) const;
197 SkScalerContext* createScalerContext(const SkDescriptor*) const;
197 198
198 protected: 199 protected:
199 /** uniqueID must be unique and non-zero 200 /** uniqueID must be unique and non-zero
200 */ 201 */
201 SkTypeface(Style style, SkFontID uniqueID, bool isFixedWidth = false); 202 SkTypeface(Style style, SkFontID uniqueID, bool isFixedWidth = false);
202 virtual ~SkTypeface(); 203 virtual ~SkTypeface();
203 204
204 friend class SkScalerContext; 205 friend class SkScalerContext;
205 static SkTypeface* GetDefaultTypeface(); 206 static SkTypeface* GetDefaultTypeface();
206 207
207 virtual int onGetUPEM() const; 208 virtual int onGetUPEM() const;
208 virtual int onGetTableTags(SkFontTableTag tags[]) const; 209 virtual int onGetTableTags(SkFontTableTag tags[]) const;
209 virtual size_t onGetTableData(SkFontTableTag, size_t offset, 210 virtual size_t onGetTableData(SkFontTableTag, size_t offset,
210 size_t length, void* data) const; 211 size_t length, void* data) const;
211 virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const; 212 virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const;
212 virtual void onFilterRec(SkScalerContextRec*) const; 213 virtual void onFilterRec(SkScalerContextRec*) const;
213 virtual void onGetFontDescriptor(SkFontDescriptor*) const; 214 virtual void onGetFontDescriptor(SkFontDescriptor*) const;
214 215
215 private: 216 private:
216 SkFontID fUniqueID; 217 SkFontID fUniqueID;
217 Style fStyle; 218 Style fStyle;
218 bool fIsFixedWidth; 219 bool fIsFixedWidth;
219 220
220 friend class SkPaint; 221 friend class SkPaint;
222 friend class SkGlyphCache; // GetDefaultTypeface
221 // just so deprecated fonthost can call protected methods 223 // just so deprecated fonthost can call protected methods
222 friend class SkFontHost; 224 friend class SkFontHost;
223 225
224 typedef SkWeakRefCnt INHERITED; 226 typedef SkWeakRefCnt INHERITED;
225 }; 227 };
226 228
227 #endif 229 #endif
OLDNEW
« no previous file with comments | « trunk/include/core/SkPaint.h ('k') | trunk/src/core/SkGlyphCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698