| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009 Google Inc. | 2 * Copyright 2009 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 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */ | 8 /* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface() { | 35 SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface() { |
| 36 static SkFontConfigInterface* gDirect; | 36 static SkFontConfigInterface* gDirect; |
| 37 if (NULL == gDirect) { | 37 if (NULL == gDirect) { |
| 38 gDirect = new SkFontConfigInterfaceDirect; | 38 gDirect = new SkFontConfigInterfaceDirect; |
| 39 } | 39 } |
| 40 return gDirect; | 40 return gDirect; |
| 41 } | 41 } |
| 42 | 42 |
| 43 int SkFontConfigInterface::countFamilies() { return 0; } |
| 44 |
| 45 int SkFontConfigInterface::getFamilySet(int index, SkString* outFamilyName, |
| 46 Style style[], int maxCount) { |
| 47 return 0; |
| 48 } |
| 49 |
| 50 int SkFontConfigInterface::matchFamilySet(const char familyName[], |
| 51 SkString* outFamilyName, |
| 52 Style styles[], int maxCount) { |
| 53 return 0; |
| 54 } |
| 55 |
| 56 /////////////////////////////////////////////////////////////////////////////// |
| 57 |
| 43 namespace { | 58 namespace { |
| 44 | 59 |
| 45 // Equivalence classes, used to match the Liberation and other fonts | 60 // Equivalence classes, used to match the Liberation and other fonts |
| 46 // with their metric-compatible replacements. See the discussion in | 61 // with their metric-compatible replacements. See the discussion in |
| 47 // GetFontEquivClass(). | 62 // GetFontEquivClass(). |
| 48 enum FontEquivClass | 63 enum FontEquivClass |
| 49 { | 64 { |
| 50 OTHER, | 65 OTHER, |
| 51 SANS, | 66 SANS, |
| 52 SERIF, | 67 SERIF, |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 } | 437 } |
| 423 if (outStyle) { | 438 if (outStyle) { |
| 424 *outStyle = GetFontStyle(match); | 439 *outStyle = GetFontStyle(match); |
| 425 } | 440 } |
| 426 return true; | 441 return true; |
| 427 } | 442 } |
| 428 | 443 |
| 429 SkStream* SkFontConfigInterfaceDirect::openStream(const FontIdentity& identity)
{ | 444 SkStream* SkFontConfigInterfaceDirect::openStream(const FontIdentity& identity)
{ |
| 430 return SkStream::NewFromFile(identity.fString.c_str()); | 445 return SkStream::NewFromFile(identity.fString.c_str()); |
| 431 } | 446 } |
| OLD | NEW |