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

Side by Side Diff: src/ports/SkFontHost_fontconfig.cpp

Issue 20672004: Implement onGetTableTags and onGetTableData on Windows. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/ports/SkFontHost_FreeType_common.h ('k') | no next file » | 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 2008 Google Inc. 2 * Copyright 2008 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 #include "SkFontConfigInterface.h" 8 #include "SkFontConfigInterface.h"
9 #include "SkFontConfigTypeface.h" 9 #include "SkFontConfigTypeface.h"
10 #include "SkFontDescriptor.h" 10 #include "SkFontDescriptor.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 SkAutoTUnref<SkFontConfigInterface> fci(RefFCI()); 177 SkAutoTUnref<SkFontConfigInterface> fci(RefFCI());
178 if (NULL == fci.get()) { 178 if (NULL == fci.get()) {
179 return NULL; 179 return NULL;
180 } 180 }
181 stream = fci->openStream(this->getIdentity()); 181 stream = fci->openStream(this->getIdentity());
182 *ttcIndex = this->getIdentity().fTTCIndex; 182 *ttcIndex = this->getIdentity().fTTCIndex;
183 } 183 }
184 return stream; 184 return stream;
185 } 185 }
186 186
187 int FontConfigTypeface::onGetTableTags(SkFontTableTag tags[]) const {
188 int ttcIndex;
189 SkAutoTUnref<SkStream> stream(this->openStream(&ttcIndex));
190 return stream.get()
191 ? SkFontStream::GetTableTags(stream, ttcIndex, tags)
192 : 0;
193 }
194
195 size_t FontConfigTypeface::onGetTableData(SkFontTableTag tag, size_t offset,
196 size_t length, void* data) const {
197 int ttcIndex;
198 SkAutoTUnref<SkStream> stream(this->openStream(&ttcIndex));
199 return stream.get()
200 ? SkFontStream::GetTableData(stream, ttcIndex,
201 tag, offset, length, data)
202 : 0;
203 }
204
205 void FontConfigTypeface::onGetFontDescriptor(SkFontDescriptor* desc, 187 void FontConfigTypeface::onGetFontDescriptor(SkFontDescriptor* desc,
206 bool* isLocalStream) const { 188 bool* isLocalStream) const {
207 desc->setFamilyName(this->getFamilyName()); 189 desc->setFamilyName(this->getFamilyName());
208 *isLocalStream = SkToBool(this->getLocalStream()); 190 *isLocalStream = SkToBool(this->getLocalStream());
209 } 191 }
210 192
211 SkTypeface* FontConfigTypeface::onRefMatchingStyle(Style style) const { 193 SkTypeface* FontConfigTypeface::onRefMatchingStyle(Style style) const {
212 return LegacyCreateTypeface(this, NULL, style); 194 return LegacyCreateTypeface(this, NULL, style);
213 } 195 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_FreeType_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698