| 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()); |
| 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 Loading... |
| 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 } |
| OLD | NEW |