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

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

Issue 12676024: Force all font backends to override onGetFontDescriptor, so we can (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
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 | « no previous file | include/core/SkTypeface.h » ('j') | include/core/SkTypeface.h » ('J')
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 SkFontHost_DEFINED 10 #ifndef SkFontHost_DEFINED
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 static SkTypeface* CreateTypefaceFromStream(SkStream*); 145 static SkTypeface* CreateTypefaceFromStream(SkStream*);
146 146
147 /** Return a new typeface from the specified file path. If the file does not 147 /** Return a new typeface from the specified file path. If the file does not
148 represent a valid font, this returns null. If a typeface is returned, 148 represent a valid font, this returns null. If a typeface is returned,
149 the caller is responsible for calling unref() when it is no longer used. 149 the caller is responsible for calling unref() when it is no longer used.
150 */ 150 */
151 static SkTypeface* CreateTypefaceFromFile(const char path[]); 151 static SkTypeface* CreateTypefaceFromFile(const char path[]);
152 152
153 /////////////////////////////////////////////////////////////////////////// 153 ///////////////////////////////////////////////////////////////////////////
154 154
155 /** Write a unique identifier to the stream, so that the same typeface can
156 be retrieved with Deserialize(). The standard format is to serialize
157 a SkFontDescriptor followed by a uint32_t length value. If the length
158 is non-zero then the following bytes (of that length) represent a
159 serialized copy of the font which can be recreated from a stream.
160 */
161 static void Serialize(const SkTypeface*, SkWStream*);
162
163 /** Given a stream created by Serialize(), return a new typeface (like
164 CreateTypeface) which is either an exact match to the one serialized
165 or the best available typeface based on the data in the deserialized
166 SkFontDescriptor.
167 */
168 static SkTypeface* Deserialize(SkStream*);
169
170 ///////////////////////////////////////////////////////////////////////////
171
172 friend class SkTypeface; 155 friend class SkTypeface;
173 }; 156 };
174 157
175 #endif 158 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkTypeface.h » ('j') | include/core/SkTypeface.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698