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

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

Issue 1317913005: whitelist fallback typefaces (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove string change Created 5 years, 3 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
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 is not valid font data, returns null. Ownership of the font data is 137 is not valid font data, returns null. Ownership of the font data is
138 transferred, so the caller must not reference it again. 138 transferred, so the caller must not reference it again.
139 */ 139 */
140 static SkTypeface* CreateFromFontData(SkFontData*); 140 static SkTypeface* CreateFromFontData(SkFontData*);
141 141
142 /** Write a unique signature to a stream, sufficient to reconstruct a 142 /** Write a unique signature to a stream, sufficient to reconstruct a
143 typeface referencing the same font when Deserialize is called. 143 typeface referencing the same font when Deserialize is called.
144 */ 144 */
145 void serialize(SkWStream*) const; 145 void serialize(SkWStream*) const;
146 146
147 /** Like serialize, but write the whole font (not just a signature) if possi ble.
148 */
149 void serializeForcingEmbedding(SkWStream*) const;
150
151 /** Given the data previously written by serialize(), return a new instance 147 /** Given the data previously written by serialize(), return a new instance
152 to a typeface referring to the same font. If that font is not available, 148 to a typeface referring to the same font. If that font is not available,
153 return null. If an instance is returned, the caller is responsible for 149 return null. If an instance is returned, the caller is responsible for
154 calling unref() when they are done with it. 150 calling unref() when they are done with it.
155 Does not affect ownership of SkStream. 151 Does not affect ownership of SkStream.
156 */ 152 */
157 static SkTypeface* Deserialize(SkStream*); 153 static SkTypeface* Deserialize(SkStream*);
158 154
159 enum Encoding { 155 enum Encoding {
160 kUTF8_Encoding, 156 kUTF8_Encoding,
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 SkFontStyle fStyle; 406 SkFontStyle fStyle;
411 bool fIsFixedPitch; 407 bool fIsFixedPitch;
412 408
413 friend class SkPaint; 409 friend class SkPaint;
414 friend class SkGlyphCache; // GetDefaultTypeface 410 friend class SkGlyphCache; // GetDefaultTypeface
415 411
416 typedef SkWeakRefCnt INHERITED; 412 typedef SkWeakRefCnt INHERITED;
417 }; 413 };
418 414
419 #endif 415 #endif
OLDNEW
« no previous file with comments | « gyp/utils.gypi ('k') | src/core/SkPictureData.cpp » ('j') | src/utils/SkWhitelistTypefaces.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698