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

Side by Side Diff: src/fonts/SkFontMgr_fontconfig.cpp

Issue 2030683002: Update typeface serialization style. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 6 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
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | src/fonts/SkTestScalerContext.cpp » ('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 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 13 matching lines...) Expand all
24 return stream->duplicate(); 24 return stream->duplicate();
25 } 25 }
26 26
27 return fFCI->openStream(this->getIdentity()); 27 return fFCI->openStream(this->getIdentity());
28 } 28 }
29 29
30 void SkTypeface_FCI::onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocalSt ream) const { 30 void SkTypeface_FCI::onGetFontDescriptor(SkFontDescriptor* desc, bool* isLocalSt ream) const {
31 SkString name; 31 SkString name;
32 this->getFamilyName(&name); 32 this->getFamilyName(&name);
33 desc->setFamilyName(name.c_str()); 33 desc->setFamilyName(name.c_str());
34 desc->setStyle(this->fontStyle());
34 *isLocalStream = SkToBool(this->getLocalStream()); 35 *isLocalStream = SkToBool(this->getLocalStream());
35 } 36 }
36 37
37 /////////////////////////////////////////////////////////////////////////////// 38 ///////////////////////////////////////////////////////////////////////////////
38 39
39 class SkFontStyleSet_FCI : public SkFontStyleSet { 40 class SkFontStyleSet_FCI : public SkFontStyleSet {
40 public: 41 public:
41 SkFontStyleSet_FCI() {} 42 SkFontStyleSet_FCI() {}
42 43
43 int count() override { return 0; } 44 int count() override { return 0; }
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 fCache.add(face, request.release()); 244 fCache.add(face, request.release());
244 245
245 return face; 246 return face;
246 } 247 }
247 }; 248 };
248 249
249 SK_API SkFontMgr* SkFontMgr_New_FCI(SkFontConfigInterface* fci) { 250 SK_API SkFontMgr* SkFontMgr_New_FCI(SkFontConfigInterface* fci) {
250 SkASSERT(fci); 251 SkASSERT(fci);
251 return new SkFontMgr_FCI(fci); 252 return new SkFontMgr_FCI(fci);
252 } 253 }
OLDNEW
« no previous file with comments | « src/core/SkTypeface.cpp ('k') | src/fonts/SkTestScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698