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

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

Issue 66783003: Remove SK_FONTHOST_USES_FONTMGR. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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
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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 274
275 /** 275 /**
276 * Return a stream for the contents of the font data, or NULL on failure. 276 * Return a stream for the contents of the font data, or NULL on failure.
277 * If ttcIndex is not null, it is set to the TrueTypeCollection index 277 * If ttcIndex is not null, it is set to the TrueTypeCollection index
278 * of this typeface within the stream, or 0 if the stream is not a 278 * of this typeface within the stream, or 0 if the stream is not a
279 * collection. 279 * collection.
280 */ 280 */
281 SkStream* openStream(int* ttcIndex) const; 281 SkStream* openStream(int* ttcIndex) const;
282 282
283 /** 283 /**
284 * Search within this typeface's family for a best match to the
285 * specified style, and return a ref to that typeface. Note: the
286 * returned object could be this, if it is the best match, or it
287 * could be a different typeface. Either way, the caller must balance
288 * this call with unref() on the returned object.
289 *
290 * Will never return NULL.
291 */
292 SkTypeface* refMatchingStyle(Style) const;
bungeman-skia 2013/11/08 20:55:55 This is what I was discussing with you previously,
293
294 /**
295 * Return a scalercontext for the given descriptor. If this fails, then 284 * Return a scalercontext for the given descriptor. If this fails, then
296 * if allowFailure is true, this returns NULL, else it returns a 285 * if allowFailure is true, this returns NULL, else it returns a
297 * dummy scalercontext that will not crash, but will draw nothing. 286 * dummy scalercontext that will not crash, but will draw nothing.
298 */ 287 */
299 SkScalerContext* createScalerContext(const SkDescriptor*, 288 SkScalerContext* createScalerContext(const SkDescriptor*,
300 bool allowFailure = false) const; 289 bool allowFailure = false) const;
301 290
302 // PRIVATE / EXPERIMENTAL -- do not call 291 // PRIVATE / EXPERIMENTAL -- do not call
303 void filterRec(SkScalerContextRec* rec) const { 292 void filterRec(SkScalerContextRec* rec) const {
304 this->onFilterRec(rec); 293 this->onFilterRec(rec);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 virtual int onGetUPEM() const = 0; 326 virtual int onGetUPEM() const = 0;
338 virtual bool onGetKerningPairAdjustments(const uint16_t glyphs[], int count, 327 virtual bool onGetKerningPairAdjustments(const uint16_t glyphs[], int count,
339 int32_t adjustments[]) const; 328 int32_t adjustments[]) const;
340 329
341 virtual LocalizedStrings* onCreateFamilyNameIterator() const = 0; 330 virtual LocalizedStrings* onCreateFamilyNameIterator() const = 0;
342 331
343 virtual int onGetTableTags(SkFontTableTag tags[]) const = 0; 332 virtual int onGetTableTags(SkFontTableTag tags[]) const = 0;
344 virtual size_t onGetTableData(SkFontTableTag, size_t offset, 333 virtual size_t onGetTableData(SkFontTableTag, size_t offset,
345 size_t length, void* data) const = 0; 334 size_t length, void* data) const = 0;
346 335
347 virtual SkTypeface* onRefMatchingStyle(Style styleBits) const = 0;
348
349 private: 336 private:
350 SkFontID fUniqueID; 337 SkFontID fUniqueID;
351 Style fStyle; 338 Style fStyle;
352 bool fIsFixedPitch; 339 bool fIsFixedPitch;
353 340
354 friend class SkPaint; 341 friend class SkPaint;
355 friend class SkGlyphCache; // GetDefaultTypeface 342 friend class SkGlyphCache; // GetDefaultTypeface
356 // just so deprecated fonthost can call protected methods 343 // just so deprecated fonthost can call protected methods
357 friend class SkFontHost; 344 friend class SkFontHost;
358 345
359 typedef SkWeakRefCnt INHERITED; 346 typedef SkWeakRefCnt INHERITED;
360 }; 347 };
361 348
362 #endif 349 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698