| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 SkTypeface* SkFontMgr_Indirect::onMatchFamilyStyleCharacter(const char familyNam
e[], | 248 SkTypeface* SkFontMgr_Indirect::onMatchFamilyStyleCharacter(const char familyNam
e[], |
| 249 const SkFontStyle& s
tyle, | 249 const SkFontStyle& s
tyle, |
| 250 const char bpc47[], | 250 const char* bcp47[], |
| 251 uint32_t character)
const { | 251 int bcpLength, |
| 252 SkFontIdentity id = fProxy->matchNameStyleCharacter(familyName, style, bpc47
, character); | 252 SkUnichar character)
const { |
| 253 SkFontIdentity id = fProxy->matchNameStyleCharacter(familyName, style, bcp47
, |
| 254 bcpLength, character); |
| 253 return this->createTypefaceFromFontId(id); | 255 return this->createTypefaceFromFontId(id); |
| 254 } | 256 } |
| 255 | 257 |
| 256 SkTypeface* SkFontMgr_Indirect::onMatchFaceStyle(const SkTypeface* familyMember, | 258 SkTypeface* SkFontMgr_Indirect::onMatchFaceStyle(const SkTypeface* familyMember, |
| 257 const SkFontStyle& fontStyle) c
onst { | 259 const SkFontStyle& fontStyle) c
onst { |
| 258 SkString familyName; | 260 SkString familyName; |
| 259 familyMember->getFamilyName(&familyName); | 261 familyMember->getFamilyName(&familyName); |
| 260 return this->matchFamilyStyle(familyName.c_str(), fontStyle); | 262 return this->matchFamilyStyle(familyName.c_str(), fontStyle); |
| 261 } | 263 } |
| 262 | 264 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 288 face.reset(this->matchFamilyStyle(NULL, style)); | 290 face.reset(this->matchFamilyStyle(NULL, style)); |
| 289 } | 291 } |
| 290 | 292 |
| 291 if (NULL == face.get()) { | 293 if (NULL == face.get()) { |
| 292 SkFontIdentity fontId = this->fProxy->matchIndexStyle(0, style); | 294 SkFontIdentity fontId = this->fProxy->matchIndexStyle(0, style); |
| 293 face.reset(this->createTypefaceFromFontId(fontId)); | 295 face.reset(this->createTypefaceFromFontId(fontId)); |
| 294 } | 296 } |
| 295 | 297 |
| 296 return face.detach(); | 298 return face.detach(); |
| 297 } | 299 } |
| OLD | NEW |