OLD | NEW |
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 Loading... |
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()); | |
35 *isLocalStream = SkToBool(this->getLocalStream()); | 34 *isLocalStream = SkToBool(this->getLocalStream()); |
36 } | 35 } |
37 | 36 |
38 /////////////////////////////////////////////////////////////////////////////// | 37 /////////////////////////////////////////////////////////////////////////////// |
39 | 38 |
40 class SkFontStyleSet_FCI : public SkFontStyleSet { | 39 class SkFontStyleSet_FCI : public SkFontStyleSet { |
41 public: | 40 public: |
42 SkFontStyleSet_FCI() {} | 41 SkFontStyleSet_FCI() {} |
43 | 42 |
44 int count() override { return 0; } | 43 int count() override { return 0; } |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 fCache.add(face, request.release()); | 243 fCache.add(face, request.release()); |
245 | 244 |
246 return face; | 245 return face; |
247 } | 246 } |
248 }; | 247 }; |
249 | 248 |
250 SK_API SkFontMgr* SkFontMgr_New_FCI(SkFontConfigInterface* fci) { | 249 SK_API SkFontMgr* SkFontMgr_New_FCI(SkFontConfigInterface* fci) { |
251 SkASSERT(fci); | 250 SkASSERT(fci); |
252 return new SkFontMgr_FCI(fci); | 251 return new SkFontMgr_FCI(fci); |
253 } | 252 } |
OLD | NEW |