| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2014 Google Inc. | 2  * Copyright 2014 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 "SkFontMgr_indirect.h" | 8 #include "SkFontMgr_indirect.h" | 
| 9 | 9 | 
| 10 #include "SkDataTable.h" | 10 #include "SkDataTable.h" | 
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 238 | 238 | 
| 239     return typeface.detach(); | 239     return typeface.detach(); | 
| 240 } | 240 } | 
| 241 | 241 | 
| 242 SkTypeface* SkFontMgr_Indirect::onMatchFamilyStyle(const char familyName[], | 242 SkTypeface* SkFontMgr_Indirect::onMatchFamilyStyle(const char familyName[], | 
| 243                                                    const SkFontStyle& fontStyle)
      const { | 243                                                    const SkFontStyle& fontStyle)
      const { | 
| 244     SkFontIdentity id = fProxy->matchNameStyle(familyName, fontStyle); | 244     SkFontIdentity id = fProxy->matchNameStyle(familyName, fontStyle); | 
| 245     return this->createTypefaceFromFontId(id); | 245     return this->createTypefaceFromFontId(id); | 
| 246 } | 246 } | 
| 247 | 247 | 
|  | 248 #ifdef SK_FM_NEW_MATCH_FAMILY_STYLE_CHARACTER | 
| 248 SkTypeface* SkFontMgr_Indirect::onMatchFamilyStyleCharacter(const char familyNam
     e[], | 249 SkTypeface* SkFontMgr_Indirect::onMatchFamilyStyleCharacter(const char familyNam
     e[], | 
| 249                                                             const SkFontStyle& s
     tyle, | 250                                                             const SkFontStyle& s
     tyle, | 
| 250                                                             const char bpc47[], | 251                                                             const char* bcp47[], | 
| 251                                                             uint32_t character) 
     const { | 252                                                             int bcp47Count, | 
| 252     SkFontIdentity id = fProxy->matchNameStyleCharacter(familyName, style, bpc47
     , character); | 253                                                             SkUnichar character)
      const { | 
|  | 254     SkFontIdentity id = fProxy->matchNameStyleCharacter(familyName, style, bcp47
     , | 
|  | 255                                                         bcp47Count, character); | 
| 253     return this->createTypefaceFromFontId(id); | 256     return this->createTypefaceFromFontId(id); | 
| 254 } | 257 } | 
|  | 258 #else | 
|  | 259 SkTypeface* SkFontMgr_Indirect::onMatchFamilyStyleCharacter(const char familyNam
     e[], | 
|  | 260                                                             const SkFontStyle& s
     tyle, | 
|  | 261                                                             const char bcp47[], | 
|  | 262                                                             SkUnichar character)
      const { | 
|  | 263     SkFontIdentity id = fProxy->matchNameStyleCharacter(familyName, style, bcp47
     , character); | 
|  | 264     return this->createTypefaceFromFontId(id); | 
|  | 265 } | 
|  | 266 #endif | 
| 255 | 267 | 
| 256 SkTypeface* SkFontMgr_Indirect::onMatchFaceStyle(const SkTypeface* familyMember, | 268 SkTypeface* SkFontMgr_Indirect::onMatchFaceStyle(const SkTypeface* familyMember, | 
| 257                                                  const SkFontStyle& fontStyle) c
     onst { | 269                                                  const SkFontStyle& fontStyle) c
     onst { | 
| 258     SkString familyName; | 270     SkString familyName; | 
| 259     familyMember->getFamilyName(&familyName); | 271     familyMember->getFamilyName(&familyName); | 
| 260     return this->matchFamilyStyle(familyName.c_str(), fontStyle); | 272     return this->matchFamilyStyle(familyName.c_str(), fontStyle); | 
| 261 } | 273 } | 
| 262 | 274 | 
| 263 SkTypeface* SkFontMgr_Indirect::onCreateFromStream(SkStream* stream, int ttcInde
     x) const { | 275 SkTypeface* SkFontMgr_Indirect::onCreateFromStream(SkStream* stream, int ttcInde
     x) const { | 
| 264     return fImpl->createFromStream(stream, ttcIndex); | 276     return fImpl->createFromStream(stream, ttcIndex); | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
| 288         face.reset(this->matchFamilyStyle(NULL, style)); | 300         face.reset(this->matchFamilyStyle(NULL, style)); | 
| 289     } | 301     } | 
| 290 | 302 | 
| 291     if (NULL == face.get()) { | 303     if (NULL == face.get()) { | 
| 292         SkFontIdentity fontId = this->fProxy->matchIndexStyle(0, style); | 304         SkFontIdentity fontId = this->fProxy->matchIndexStyle(0, style); | 
| 293         face.reset(this->createTypefaceFromFontId(fontId)); | 305         face.reset(this->createTypefaceFromFontId(fontId)); | 
| 294     } | 306     } | 
| 295 | 307 | 
| 296     return face.detach(); | 308     return face.detach(); | 
| 297 } | 309 } | 
| OLD | NEW | 
|---|